home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / data / fapx / fapxonln.plp < prev    next >
Text File  |  1994-11-16  |  68KB  |  2,805 lines

  1. /************************************************************************
  2. *    通信時共通処理ルーチン                        *
  3. *************************************************************************/
  4. /*    通信時間記録処理    */
  5. %RECTIME{
  6.     %dt    @getdt;
  7.     %time    @linetime;
  8.     %hh    time/3600;
  9.     %hh    @case(@nochar(hh),1,{im({0}|hh)},,{im(hh)});
  10.     %mm    (time-time/3600*3600)/60;
  11.     %mm    @case(@nochar(mm),1,{im({0}|mm)},,{im(mm)});
  12.     %ss    time-time/60*60;
  13.     %ss    @case(@nochar(ss),1,{im({0}|ss)},,{im(ss)});
  14.     write(LOG2|{CONNECT.DAT},
  15.         {tel no=}|@SPP(TELNO,12,1)|
  16.         {;  logout=}|@getchar(dt,1,10)|{ }|@getchar(dt,17,8)|
  17.         {;  time=}|hh|{h}|mm|{m}|ss|{s}|
  18.         {; id=}|UID|{;\n});
  19.     };
  20.  
  21. /*    ログインメッセージ処理    */
  22. %MSGOUT    {
  23.     write(LOG2|{LASTLOG\}|UID|{.DAT},
  24.         @tail(@read(TEMP2|{fmsg.tmp}),{Reserved\n})|CRLF);
  25.     %smsg @read(TEMP2|{fmsg.tmp});
  26.     %smsg @case(@noline(smsg)>3,{No},{im(smsg)},
  27.         {Yes},
  28.         {im(@tail(@getline(smsg,1,@noline(smsg)-2),{Reserved\n}))});
  29.     case    (smsg,CRLF,,,
  30.         {
  31.         %msgf LOG2|{LASTLOG\}|UID|{.};
  32.         case(@filechk(msgf|{MSG}),{Yes},
  33.             {case(smsg,@read(msgf|{MSG}),,,
  34.                 {
  35.                 dispoff(!DEBUG);
  36.                 command({copy }|msgf|{MSG }|msgf|{BAK});
  37.                 dispoff({No});
  38.                 });
  39.             delfile(msgf|{MSG});
  40.             });
  41.         write(msgf|{MSG},smsg);
  42.         });
  43.     delfile(TEMP2|{fmsg.tmp});
  44.     };
  45.  
  46. /*    ログイン/アウト日時記録と時刻合わせ    */
  47. %LASTLOG{
  48.     %SetTime{
  49.         %a    @body(@read(LOG2|{LASTLOG\}|UID|{.DAT}),,
  50.                 {\n\n ご利用時間は、});
  51.         %date    @tail(a,{LOG OUT --- },{    });
  52.         %time    @tail(a,{    });
  53.         case    (date={}||time={}||@getchar(time,1,2)>22,
  54.             {No},
  55.             {
  56.             dispoff(!DEBUG);
  57.             command({time }|time);/* MS-DOSで時間を設定する */
  58.             command({date }|date);/* MS-DOSで日付を設定する */
  59.             dispoff({No});
  60.             });
  61.         };
  62.  
  63.     case    (LASTCHK<>{No}||SETTIME<>{No},
  64.         {Yes},
  65.         {
  66.         case(UID={},{Yes},{UID:={_DEFAULT}});
  67.         mkdir2(LOG2|{LASTLOG});
  68.         delfile(LOG2|{LASTLOG\}|UID|{.DAT});
  69.         case(@filechk(TEMP2|{fmsg.tmp}),{Yes},{MSGOUT});
  70.         receive(LOG2|{LASTLOG\}|UID|{.DAT});
  71.         loop    ({
  72.             type({BYE\n});
  73.             wait    (Wtime2,{discon;im({No})},
  74.                 {\n01+},{discon;im({No})},
  75.                 {HOST NAME?\n*},
  76.                 {type({OFF\n});wait(3);discon;im({No})},
  77.                 {◆番号又はコマンドを入力して下さい◆\n},
  78.                 {im({Yes})}
  79.                 );
  80.             });
  81.         stoprec;
  82.         },
  83.         {No},
  84.         {
  85.         loop    ({
  86.             type({BYE\n});
  87.             wait    (Wtime2,{discon;im({No})},
  88.                 {\n01+},{discon;im({No})},
  89.                 {HOST NAME?\n*},
  90.                 {type({OFF\n});wait(3);discon;im({No})},
  91.                 {◆番号又はコマンドを入力して下さい◆\n},
  92.                 {im({Yes})}
  93.                 );
  94.             });
  95.         });
  96.     case(SETTIME<>{No},{Yes},{SetTime});
  97.     case(LASTCHK,{No},
  98.         {delfile(LOG2|{LASTLOG\}|UID|{.DAT});rmdir(LOG2|{LASTLOG})});
  99.     };
  100.  
  101. /*    前回ログアウト時間のチェック    */
  102. %CHKLASTLOG{
  103.     wait    (Wtime2,{AbortOff({ホストが重いよぉ~})},
  104.         {\n},
  105.         {stoprec;
  106.         case(@filechk(TEMP2|{fmsg.tmp}),{Yes},
  107.             {case    (@body(@read(TEMP2|{fmsg.tmp}),
  108.                 {NIFTY Corporation}),{},
  109.                 {
  110.                 CUGFLAG:={Yes};
  111.             /*    case(@filechk(CDIR2|UID|{.CUG}),{No},
  112.                     {CUGFLAG:={};
  113.                     receive(TEMP2|UID|{.TOP});
  114.                     })*/
  115.                 },
  116.                 ,{CUGFLAG:={No}})
  117.             });
  118.         case    (@filechk(LOG2|{LASTLOG\}|UID|{.DAT}) && LASTCHK<>{No},
  119.             {Yes},
  120.             {
  121.             case    (@tail(@laststr,{LOG OUT },CRLF)=
  122.                 @tail(@read(LOG2|{LASTLOG\}|UID|{.DAT}),
  123.                     {LOG OUT --- },CRLF),
  124.                 {Yes},
  125.                 {
  126.                 display({\n前回ログアウト時間の確認}|
  127.                     { OK!\n});
  128.                 },
  129.                 {No},
  130.                 {
  131.                 SNDMSG({okasi_f.snd});
  132.                 display({\n注意! }|
  133.                     {前回ログアウト時間が違います!\n});
  134.                 });
  135.             });
  136.         });
  137.     };
  138.  
  139. /*    アップ/ダウンロード速度記録    */
  140. %UPDNRATE{
  141.     [flg,FILE,Fsize,timePS]
  142.     %rate    Fsize/timePS;
  143.     %date    @getdt;
  144.     %MSG    @case    (flg,
  145.             {up},{im({アップ})},
  146.             {down},{im({ダウン})});
  147.     %file    @case    (flg,
  148.             {up},{im(LOG2|{upldrate.dat})},
  149.             {down},{im(LOG2|{downrate.dat})});
  150.     display({\n}|Fsize|{バイト}|MSG|{するのに}|
  151.         timePS|{秒くらいかかりました。約}|rate|{byte/sec。\n});
  152.     case(APTYPE={x},{Yes},{TELNO:={xxxx-xx-xxxx}});
  153.     case    (@filechk(file),
  154.         {No},
  155.         {write(file,{  日  付   時 刻   電話番号    }|
  156.                 {A P  ファイル名   サイズ 時 間 レート\n})}
  157.         );
  158.     write(file,
  159.         @getchar(date,1,10)|{ }|@getchar(date,17,5)|{ }|
  160.         @SPP(TELNO,13,1)|{ ROAD}|APTYPE|{ }|
  161.         @SPP(@tail(FILE,{\}),12,1)|{ }|
  162.         @SPP(Fsize,7,)|{ }|@SPP(timePS,5,)|{ }|
  163.         @SPP(rate,6,)|{\n});
  164.     };
  165.  
  166. /*    異常切断処理    */
  167. %AbortOff{
  168.     [CommentB]
  169.     display(CommentB);
  170.     SNDMSG({okasi_f.snd});
  171.     display({\nNIFTYとの通信を強制切断します\n});
  172.     footnote({異常終了処理中});
  173.     case    (RecForm={},
  174.         {Yes},,
  175.         {No},
  176.         {
  177.         case    (RecForm={All},
  178.             {Yes},{DOWNSTOP},
  179.             {No},{LOGforum(RecForm,{stop})}
  180.             );
  181.         });
  182.     LASTLOG;
  183.     discon;
  184.     RECTIME;
  185.     display({\nモデムを直接切断しました\n\n});
  186.     SNDMSG({owata_f.snd});
  187.     footnote({});
  188.     stop;
  189.     };
  190.  
  191. /*    異常切断処理    */
  192. %Abort    {
  193.     [CommentB]
  194.     display(CommentB);
  195.     SNDMSG({okasi_f.snd});
  196.     display({\nNIFTYとの通信を強制切断します\n});
  197.     footnote({異常終了処理中});
  198.     discon;
  199.     display({\nモデムを直接切断しました\n\n});
  200.     SNDMSG({owata_f.snd});
  201.     footnote({});
  202.     stop;
  203.     };
  204.  
  205. /*切断処理 及び 切断終了表示処理*/
  206. %LogOff    {
  207.     case    (CHKBILL={Sometimes},
  208.         {Yes},
  209.         {
  210.         %time    @linetime-Stime;
  211.         %sec    time-(time/60)*60;
  212.         case    (sec<45&&sec>31,{Yes},{GOBILL});
  213.         });
  214.     display({\n切断処理を開始しました\n\n});
  215.     footnote({終了処理中});
  216.     LASTLOG;
  217.     RECTIME;
  218.     case(@filechk(TEMP2|{newidx.tmp}),{Yes},{CHKnew});
  219.     footnote({});
  220.     };
  221.  
  222. %WAITABORT{
  223.     [sec]
  224.     wait    (sec,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  225.         {\n>},,    {\nmore>},,    {\nnext>},,
  226.         {\nFORUM>},,    {\nCCS(N)>},,    {\nCCS(R)>},,
  227.         {\nCCS(P)>},,    {\nLIB>},,    {\nHP>},,
  228.         {\nMAIL>},,    {\nBBS>},,    {\nPATIO(N)>},,
  229.         {\nPATIO(R)>},,    {\nPATIO(P)>},,    {\n:},,
  230.         {\n}|@xc({1b})|{[2J}|@xc({1b})|{[1;1H}|{>},
  231.         );
  232.     };
  233.  
  234. %WAITCHAR{
  235.     [sec,Waitchr,WaitcmdC]
  236.     wait    (sec,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  237.         Waitchr,WaitcmdC);
  238.     };
  239.  
  240. /*    初期設定処理    */
  241. %initmode{
  242.     case    (@tail(MODEM,{00}),
  243.         {m},{xon({Yes});rscs({Yes})},
  244.         {n},{xon({Yes});rscs({No})});
  245.     ctrl    ({Yes});
  246.     esc    ({Yes});
  247.     stopbit    ({1});
  248.     parity    ({None});
  249.     lineend    ({CR});
  250.     flyingx    ({No});
  251.     dataleng({8bit});
  252.     logprint({No});
  253.     flyline    ({3});
  254.     sendtype({Line});
  255.     dispecho({Yes});
  256.     code    ({sjis});
  257.     };
  258.  
  259. /*    フォーラムのトップメニューへ行く    */
  260. %FORUMTOP{[entr]
  261.     %ewrite    {
  262.         ln:=ln+1;
  263.         inx:=inx|@tail(@body(@laststr(90),,{\n}),{\n})|CRLF;
  264.         case(ln,20,{write(TEMP2|{finfo.tmp},inx);inx:={};ln:=0});
  265.         im({Yes})
  266.         };
  267.     %finfo    {
  268.         [mode]
  269.         case(ln>0,{Yes},{write(TEMP2|{finfo.tmp},inx);inx:={};ln:=0});
  270.         case    (mode={},
  271.             {Yes},
  272.             {
  273.             case    (chk<>2,
  274.                 {Yes},
  275.                 {
  276.                 %fin @read(TEMP2|{finfo.tmp},2);
  277.                 FTITLE:=@head(fin,{\n},{>    })|{>    }|
  278.                     @tail(fin,{>    },{\n})|{\n};
  279.                 %fin @head(fin,FTITLE)|FTITLE|
  280.                     @tail(fin,FTITLE,{SET });
  281.                 mkdir2(LOG2|{SIGN});
  282.                 case    (chk,
  283.                     0,
  284.                     {write(LOG2|{SIGN\}|fname|{.sgn},
  285.                         fin|{>MES\n>LIB\n> ***\n})},
  286.                     1,
  287.                     {
  288.                     %st {>MES}|@body(@read(LOG2|{SIGN\}|
  289.                         fname|{.sgn}),{>MES});
  290.                     delfile(LOG2|{SIGN\}|fname|{.sgn});
  291.                     write(LOG2|{SIGN\}|fname|{.sgn},fin|st)
  292.                     });
  293.                 },
  294.                 {No},
  295.                 {
  296.                 FTITLE:=@head(@read(LOG2|{SIGN\}|fname|{.sgn}),
  297.                     {\n},{>    })|    {>    }|
  298.                     @tail(@read(LOG2|{SIGN\}|fname|{.sgn}),
  299.                     {>    },{\n})|{\n};
  300.                 });
  301.             case    (fname,
  302.                 {BEGIN},{FTITLE:={<練習・質問コーナー>\n}}
  303.                 );
  304.             },
  305.             {No},{FTITLE:={}}
  306.             );
  307.         delfile(TEMP2|{finfo.tmp});
  308.         };
  309.     %SET    {
  310.         type({SET MENU ON\n});WAITABORT(Wtime2);
  311.         type({SET PAGE OFF\n});WAITABORT(Wtime2);
  312.         type({SEND OFF\n});WAITABORT(Wtime2);
  313.         case    (DLMFLAG={Yes},
  314.             {Yes},,
  315.             {No},
  316.             {type({SET DLM ON\n});WAITABORT(Wtime2);DLMFLAG:={Yes}}
  317.             );
  318.         };
  319.     var    inx[1620];    var    ln[2];ln:=0;
  320.     loop    ({
  321.         wait    (Wtime2,{finfo(1);im({forumGroup})},
  322.             {◆番号又はコマンドを入力して下さい◆},
  323.             {WAITABORT(Wtime2);finfo(1);SNDMSG({okasi_f.snd});
  324.                 display({フォーラム名が違っていませんか?\n});
  325.                 im({forumERROR})},
  326.             {入会手続き\n>},
  327.             {finfo(0);SNDMSG({okasi_f.snd});
  328.                 display({入会していないフォーラムです\n});
  329.                 case(entr,1,{im({NotMember})},,
  330.                 {
  331.                 type({3\n});
  332.                 WAITCHAR(Wtime2,{ 改行のみ実名)\n:},
  333.                     {type(HANDLE|{\n})});
  334.                 WAITCHAR(Wtime2,{ (1:OK  2:NG)\n:},
  335.                     {type({1\n})});
  336.                 WAITCHAR(Wtime2,{ (1:登録する  2:しない)\n:},
  337.                     {type({1\n})});
  338.                 inx:={};ln:=0;
  339.                 loop    ({
  340.                 wait    (Wtime2,
  341.                     {AbortOff({ホストの反応が鈍いよぉ~})},
  342.                     {-登録完了-\n},{ewrite},
  343.                     {続き (改行で表示 E:終了)\n>},
  344.                     {type({\n});ewrite},
  345.                     {\n>},{im({No})},
  346.                     {\nFORUM>},{im({No})},
  347.                     {\n},{ewrite}
  348.                     );
  349.                     });
  350.                 SET;finfo();im({OK})
  351.                 })},
  352.             {現在、サービスは大変混雑しています。},
  353.             {WAITABORT(Wtime2);finfo(1); SNDMSG({okasi_f.snd});
  354.                 display({混雑しているため次の処理に移ります\n});
  355.                 im({Busy})},
  356.             {-保守作業の為しばらくの間御利用頂けません-},
  357.             {WAITABORT(Wtime2);finfo(1); SNDMSG({okasi_f.snd});
  358.                 display({保守作業中のため次の処理に移ります\n});
  359.                 im({Maintenance});},
  360.             {◆現在このフォーラムはメンテナンス作業中につき},
  361.             {WAITABORT(Wtime2);finfo(1); SNDMSG({okasi_f.snd});
  362.                 display({保守作業中のため次の処理に移ります\n});
  363.                 im({Maintenance});},
  364.             {続き (改行で表示 E:終了)\n>},{type({\n});im({Yes})},
  365.             {\nmore>},{type({\n});im({Yes})},
  366.             {続き (改行で次メニュー  E:終了)\n>},
  367.             {type({\n});im({Yes})},
  368.             {ステータスチャンネル (人数)\n},
  369.             {RtcOpen:={Y};im({Yes})},
  370.             {:オプション  E:終了\n>},{SET;finfo();im({OK})},
  371.             {:保守    E:終了\n>},{SET;finfo();im({OK})},
  372.             {\nFORUM>},{SET;finfo();im({OK})},
  373.             {\n},
  374.             {case    (chk<>2,
  375.                 {Yes},
  376.                 {ewrite;    /* フォーラム初期メッセージ出力 */});
  377.             im({Yes});
  378.             });
  379.         });    /*    loop 終了    */
  380.     };
  381.  
  382. /*    CUG 会議室に行く    */
  383. %CUGMESTOP{
  384.     %cinfo    {
  385.         [mode]
  386.         case    (mode={},
  387.             {Yes},
  388.             {
  389.             case    (fname,
  390.                 {HIROBA},
  391.                 {FTITLE:={<メーテル広場>     HIROBA\n}},
  392.                 ,{FTITLE:={}}
  393.                 );
  394.                 %fin @read(TEMP2|{finfo.tmp},2);
  395.                 FTITLE:=@head(fin,{\n},{>    })|{>    }|
  396.                     @tail(fin,{>    },{\n})|{\n};
  397.                 %fin @head(fin,FTITLE)|FTITLE|
  398.                     @tail(fin,FTITLE,{SET });
  399.             %cum    @head(@read(TEMP2|{mesl.tmp},2),{SET MENU ON});
  400.             mkdir2(LOG2|{SIGN});
  401.             case    (chk=0,
  402.                 {Yes},
  403.                 {write(LOG2|{SIGN\}|fname|{.sgn},
  404.                     FTITLE|cum|{> ***\n})},
  405.                 {No},
  406.                 {
  407.                 %st @body(@read(LOG2|{SIGN\}|
  408.                     fname|{.sgn}),{> ***});
  409.                 delfile(LOG2|{SIGN\}|fname|{.sgn});
  410.                 write(LOG2|{SIGN\}|fname|{.sgn},
  411.                     FTITLE|cum|{> ***|st});
  412.                 });
  413.             },
  414.             {No},{FTITLE:={}}
  415.             );
  416.         delfile(TEMP2|{mesl.tmp});
  417.         };
  418.     %SET    {
  419.         type({SET MENU ON\n});WAITABORT(Wtime2);
  420.         type({SET PAGE OFF\n});WAITABORT(Wtime2);
  421.         case    (DLMFLAG={Yes},
  422.             {Yes},,
  423.             {No},
  424.             {type({SET DLM ON\n});WAITABORT(Wtime2);DLMFLAG:={Yes}}
  425.             );
  426.         };
  427.     loop    ({
  428.         wait    (Wtime2,{cinfo(1);im({forumGroup})},
  429.             {◆番号又はコマンドを入力して下さい◆},
  430.             {WAITABORT(Wtime2);cinfo(1);SNDMSG({okasi_f.snd});
  431.                 display({現在のIDが違っていませんか?\n});
  432.                 im({CUGError});},
  433.             {-現在会議室には登録されていません-},
  434.             {WAITABORT(Wtime2);cinfo(1);SNDMSG({okasi_f.snd});
  435.                 display({会議室登録を確認してください\n});
  436.                 im({NotRegister});},
  437.             {現在、サービスは大変混雑しています。},
  438.             {WAITABORT(Wtime2);cinfo(1); SNDMSG({okasi_f.snd});
  439.                 display({混雑のため次の処理に移ります\n});
  440.                 im({Busy});},
  441.             {-保守作業の為しばらくの間御利用頂けません-},
  442.             {WAITABORT(Wtime2);cinfo(1); SNDMSG({okasi_f.snd});
  443.                 display({保守作業中のため次の処理に移ります\n});
  444.                 im({Maintenance});},
  445.             {続き (改行で表示 E:終了)\n>},{type({\n});im({Yes})},
  446.             {\nmore>},{type({\n});im({Yes})},
  447.             {続き (改行で次メニュー  E:終了)\n>},
  448.                 {type({\n});im({Yes})},
  449.             {\n>},{SET;cinfo();im({OK})},
  450.             {\n},
  451.             {
  452.             write    (TEMP2|{mesl.tmp},/* 会議室名一覧出力 */
  453.                 @tail(@body(@laststr(90),,{\n}),{\n})|CRLF);
  454.             im({Yes});
  455.             });
  456.         });    /*    loop 終了    */
  457.     };
  458.  
  459. /*    看板ファイルチェック    */
  460. %defp    {
  461.     case    (@filechk(LOG2|{SIGN\}|fname|{.sgn}),
  462.         {No},{im(0)},
  463.         {Yes},
  464.         {
  465.         %tk    @read(LOG2|{SIGN\}|fname|{.sgn});
  466.         %tm    @getchar(@getline(tk,@noline(tk)-1,1),16,14);
  467.         %nday    @getchar(@daylong,1,14);
  468.         case(tm=nday,{Yes},{im(2)},{No},{im(1)});
  469.         });
  470.     };
  471.  
  472. /*    フォーラムとCUG会議室の区別    */
  473. %CUGFchk{
  474.     [fname]
  475.     var    cfn[8];
  476.     var    s[50];    s:=CUGFORUMLIST;
  477.     loop    ({
  478.         cfn:=@head(s,{/});
  479.         case    (cfn,
  480.             fname,    {im({No})},
  481.             {},    {im({No})},
  482.             ,{s:=@body(s,{/});im({Yes})}
  483.             );
  484.         });
  485.     im(cfn=fname)
  486.     };
  487.  
  488. /*    skip top message    */
  489. %TOPMENU{
  490.     var    sdlm[1];
  491.     loop    ({
  492.         wait    (Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  493.             {NIFTY-Serve     TOP},    
  494.             {WAITABORT(Wtime2)},
  495.             {NIFTY-Serve    TOP},    /* 94.04.01 NIFTY仕様変更 */
  496.             {WAITABORT(Wtime2)},
  497.             CUGTOPMENU,    /* CUG */
  498.             {WAITABORT(Wtime2)},
  499.             {CUG トップ},{sdlm:=1;WAITABORT(Wtime2);GONIF},
  500.             {\n>},
  501.             {
  502.             case(TOPON,{No},{im({No})},,
  503.                 {type({\n});im({Yes})})
  504.             });
  505.         });
  506.     case(sdlm,{},
  507.         {
  508.         type({SET DLM ON\n});
  509.         WAITABORT(Wtime2);
  510.         DLMFLAG:={Yes};
  511.         });
  512.     };
  513.  
  514. /*    niftyへ行く    */
  515. %GONIF    {
  516.     type({GO NIF\n});WAITABORT(Wtime2);
  517.     type({1\n});
  518.     CUGFLAG:={No};Where:={};
  519.     TOPMENU;
  520.     };
  521.  
  522. /*    CUGへ行く    */
  523. %GOCUGTOP{
  524.     case    (GOCUGCMD<>{},{Yes},
  525.         {type(GOCUGCMD|{\n});
  526.         wait    (Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  527.             CUGTOPMENU,
  528.             {
  529.             WAITABORT(Wtime2);CUGFLAG:={Yes};
  530.             Where:={};
  531.             type({SET DLM ON\n});
  532.             WAITABORT(Wtime2);DLMFLAG:={Yes};
  533.             },
  534.             {◆番号又はコマンドを入力して下さい◆},
  535.             {WAITABORT(Wtime2)}
  536.             );
  537.         });
  538.     };
  539.  
  540. /*    LOG DOWN START    */
  541. %DOWNSTART{
  542.     case    (LOGmode={forum},{No},
  543.         {
  544.         case    (RECFILE,{},
  545.             {
  546.             display({\nダウンロードを開始します\n});
  547.             case    (COMPRESS={Yes}&&ARCHIVER<>{},
  548.                 {Yes},
  549.                 {RECFILE:=TEMP2|{fapx.log};
  550.                 receive(RECFILE)},
  551.                 {No},
  552.                 {
  553.                 mkdir2(LOG2|{Niftylog});
  554.                 RECFILE:=LOG2|{Niftylog\}|
  555.                     @crefile(LOG2|{Niftylog},{log});
  556.                 receive(RECFILE);
  557.                 });
  558.             },,
  559.             {
  560.             dispoff(!DEBUG);
  561.             display({\nダウンロードを再開します\n});
  562.             dispoff({No});
  563.             receive(RECFILE)
  564.             });
  565.         RecForm:={All};
  566.         })
  567.     };
  568.  
  569. /*    LOG DOWN STOP    */
  570. %DOWNSTOP{
  571.     case    (LOGmode={forum},{No},
  572.         {
  573.         stoprec;
  574.         RecForm:={};
  575.         case    (COMPRESS={Yes}&&ARCHIVER<>{},
  576.             {Yes},
  577.             {
  578.             %file    @nowfile2(RECFILE,TEMP);
  579.             dispoff(!DEBUG);
  580.             command(ARCHIVER|{ a }|LOG2|{Niftylog.lzh }|
  581.                         TEMP2|file);
  582.             dispoff({No});
  583.             delfile(TEMP2|file);
  584.             },
  585.             {No},{}
  586.             );
  587.         display({\nダウンロードを終了しました\n});
  588.         setcdir(CDIR);
  589.         RECFILE:={};
  590.         });
  591.     };
  592.  
  593. /*    LOG DOWN PAUSE    */
  594. %DOWNPAUSE{
  595.     case    (LOGmode={forum},{No},
  596.         {
  597.         stoprec;
  598.         RecForm:={};
  599.         dispoff(!DEBUG);
  600.         display({\nダウンロードを中断しました\n});
  601.         dispoff({No});
  602.         });
  603.     };
  604.  
  605. /*    フォーラム毎にダウンロードファイルを作成する    */
  606. %LOGforum{
  607.     [fname,mode]
  608.     %dlt    {
  609.         RecForm:={};delfile(RECFILE);
  610.         setcdir(CDIR);
  611.         rmdir(@body(RECFILE,,{\}));
  612.         RECFILE:={};
  613.         };
  614.     case    (mode,
  615.         {start},
  616.         {
  617.         RecForm:=fname;
  618.         case    (RECFILE,{},
  619.             {
  620.             display({\n}|@tail(fname,{\})|
  621.                 {のダウンロードを開始します\n});
  622.             case    (COMPRESS={Yes}&&@filechk(ARCHIVER)={Yes},
  623.                 {Yes},
  624.                 {
  625.                 RECFILE:=TEMP2|fname|{.log};
  626.                 mkdir2(@body(RECFILE,,{\}));
  627.                 delfile(RECFILE);
  628.                 receive(RECFILE)
  629.                 },
  630.                 {No},
  631.                 {
  632.                 RECFILE:=LOG2|fname|{\}|
  633.                     @crefile(LOG2|fname,{log});
  634.                 receive(RECFILE)
  635.                 });
  636.             },,
  637.             {
  638.             dispoff(!DEBUG);
  639.             display({\n}|@tail(fname,{\})|
  640.                 {のダウンロードを再開します\n});
  641.             dispoff({No});
  642.             receive(RECFILE)
  643.             });
  644.         },
  645.         {pause},
  646.         {
  647.         stoprec;
  648.         RecForm:={};
  649.         dispoff(!DEBUG);
  650.         display({\n}|@tail(fname,{\})|{のダウンロードを中断しました\n});
  651.         dispoff({No});
  652.         },
  653.         {stop},
  654.         {
  655.         stoprec;
  656.         RecForm:={};
  657.         display({\n}|@tail(fname,{\})|{のダウンロードを終了しました\n});
  658.         case(COMPRESS={Yes}&&@filechk(ARCHIVER)={Yes},
  659.             {Yes},
  660.             {
  661.             mkdir2(@body(RECFILE,,{\}));setcdir(TEMP);
  662.             %file    @nowfile2(RECFILE,TEMP);
  663.             dispoff(!DEBUG);
  664.             command(ARCHIVER|{ a }|LOG2|fname|{.lzh }|TEMP2|file);
  665.             dispoff({No});
  666.             delfile(TEMP2|file);
  667.             });
  668.         setcdir(CDIR);
  669.         RECFILE:={};
  670.         },
  671.         {cancel},
  672.         {
  673.         stoprec;
  674.         display({\n}|@tail(fname,{\})|{のダウンロードを取消しました\n});
  675.         dlt
  676.         },
  677.         {del},
  678.         {
  679.         stoprec;
  680.         display({\n}|@tail(fname,{\})|{のダウンロードを終了しました\n});
  681.         dlt
  682.         });
  683.     };
  684.  
  685. %PAUSE    {
  686.     [fname]
  687.     DOWNPAUSE;
  688.     case(LOGmode,{forum},{LOGforum(fname,{pause})});
  689.     };
  690.     
  691. %RESUME    {
  692.     [fname]
  693.     DOWNSTART;
  694.     case(LOGmode,{forum},{LOGforum(fname,{start})});
  695.     };
  696.  
  697. /************************************************************************
  698. *    NIFTY内高速移動処理ルーチン                *
  699. *        GO(    {forum/FORUM/mes/99}    );            *
  700. *            {forum/FORUM/lib/99}                *
  701. *            {forum/FORUM/bul}                *
  702. *            {forum/FORUM}                    *
  703. *            {cugmes/NAME/mes/99}                *
  704. *            {cugmes/NAME}                    *
  705. *            {hp/DEF12345/PASSWORD}                *
  706. *            {patio/XYZ98765/PASSWORD/mes/99}        *
  707. *            {mail}                        *
  708. *            {wpnc}                        *
  709. *            {center}                    *
  710. *            {newyear/text}                    *
  711. *            {NAPnewyear/text}                *
  712. *************************************************************************/
  713. %GO    {
  714.     [goto]
  715.     %meswait{
  716.         wait    (Wtime4,
  717.             {Where:={};im({No})},
  718.             {◆番号又はコマンドを入力して下さい◆},
  719.             {WAITABORT(Wtime2);im({No})},
  720.             {◆該当する会議室がありません◆},
  721.             {WAITABORT(Wtime2);im({No})},
  722.             {◆この機能は本フォーラムではご利用できません},
  723.             {WAITABORT(Wtime2);im({No})},
  724.             {-この会議室はリードオンリーです-},
  725.             {
  726.             mltitle:=@laststr(128);
  727.             WAITABORT(Wtime2);
  728.             Where:=goto;
  729.             im({ReadOnly});
  730.             },
  731.             {電子会議},
  732.             {
  733.             mltitle:=@laststr(128);
  734.             WAITABORT(Wtime2);
  735.             Where:=goto;im({Yes})
  736.             });
  737.         };
  738.  
  739.     %GOforum{
  740.         case    (@nth(Where,1,{/})={forum} &&
  741.              @nth(Where,2,{/})=@nth(goto,2,{/}),
  742.             {No},
  743.             {
  744.             %fname @nth(goto,2,{/});%chk @defp;
  745.             case    (CUGFLAG,
  746.                 {No},{case(@CUGFchk(fname),{Yes},{GOCUGTOP});},
  747.                 {Yes},{case(@CUGFchk(fname),{No},{GONIF});}
  748.                 );
  749.             type({GO }|fname|{\n});
  750.             case(fname,{BEGIN},{WAITABORT(Wtime2);type({4\n})});
  751.             case    (@FORUMTOP(0),
  752.                 {OK},    
  753.                 {
  754.                 Where:={forum/}|@nth(goto,2,{/});
  755.                 case    (@nth(goto,3,{/}),
  756.                     {mes},{GOmes},
  757.                     {lib},{GOlib},
  758.                     {bul},{GObul},
  759.                     ,{im({Yes})}
  760.                     );
  761.                 },
  762.                 {forumERROR},
  763.                 {Where:={};im({No})},
  764.                 {NotMember},
  765.                 {Where:={};im({No})},
  766.                 {Busy},
  767.                 {Where:={};im({No})},
  768.                 {Maintenance},
  769.                 {Where:={};im({No})},
  770.                 ,
  771.                 {Where:={};im({No})}
  772.                 );
  773.             },
  774.             {Yes},
  775.             {
  776.             case    (@nth(goto,3,{/}),
  777.                 {mes},{GOmes},
  778.                 {lib},{GOlib},
  779.                 {bul},{GObul},
  780.                 ,{im({Yes})}
  781.                 );
  782.             });
  783.         };
  784.  
  785.     %GOmes    {
  786.         case    (@nth(Where,3,{/})={mes},
  787.             {Yes},
  788.             {
  789.             case    (@nth(Where,4,{/}),@nth(goto,4,{/}),
  790.                 {im({Yes})},
  791.                 {},
  792.                 {
  793.                 type(@nth(goto,4,{/}));type({\n});
  794.                 meswait;
  795.                 },
  796.                 ,
  797.                 {
  798.                 type({RX }|@nth(goto,4,{/}));type({\n});
  799.                 meswait;
  800.                 });
  801.             },
  802.             {No},
  803.             {
  804.             type({MES }|@nth(goto,4,{/}));type({\n});
  805.             meswait;
  806.             });
  807.         };
  808.  
  809.     %GOlib    {
  810.         %libwait{
  811.             wait    (Wtime4,
  812.                 {Where:={};im({No})},
  813.                 {◆番号又はコマンドを入力して下さい◆},
  814.                 {WAITABORT(Wtime2);im({No})},
  815.                 {◆該当するライブラリがありません◆},
  816.                 {WAITABORT(Wtime2);im({No})},
  817.                 {◆これ以降のライブラリはありません◆},
  818.                 {WAITABORT(Wtime2);im({No})},
  819.                 {◆この機能は本フォーラムではご利用できません},
  820.                 {WAITABORT(Wtime2);im({No})},
  821.                 {データライブラリ (1:データ一覧},
  822.                 {
  823.                 mltitle:=@laststr(128);
  824.                 WAITABORT(Wtime2);
  825.                 Where:=goto;im({Yes})
  826.                 });
  827.             };
  828.         case    (@nth(Where,3,{/})={lib},
  829.             {Yes},
  830.             {
  831.             case    (@nth(Where,4,{/}),@nth(goto,4,{/}),
  832.                 {im({Yes})},
  833.                 {},
  834.                 {
  835.                 type(@nth(goto,4,{/}));type({\n});
  836.                 libwait;
  837.                 },
  838.                 ,
  839.                 {
  840.                 type({LX }|@nth(goto,4,{/}));type({\n});
  841.                 libwait;
  842.                 });
  843.             },
  844.             {No},
  845.             {
  846.             type({LIB }|@nth(goto,4,{/}));type({\n});
  847.             libwait;
  848.             });
  849.         };
  850.  
  851.     %GObul    {
  852.         case    (@nth(Where,3,{/})={bul},
  853.             {No},
  854.             {
  855.             type({BUL\n});
  856.             wait    (Wtime4,
  857.                 {Where:={};im({No})},
  858.                 {◆番号又はコマンドを入力して下さい◆},
  859.                 {WAITABORT(Wtime2);im({No})},
  860.                 {◆この機能は本フォーラムではご利用できません},
  861.                 {WAITABORT(Wtime2);im({No})},
  862.                 {\n>},
  863.                 {Where:=goto;im({Yes})}
  864.                 );
  865.             });
  866.         };
  867.  
  868.     %GOcugmes{
  869.         %GOcmes    {
  870.             case    (@nth(Where,4,{/}),@nth(goto,4,{/}),
  871.                 {im({Yes})},
  872.                 {},
  873.                 {
  874.                 type(@nth(goto,4,{/})|{\n});
  875.                 meswait;
  876.                 },
  877.                 ,
  878.                 {
  879.                 type({RX }|@nth(goto,4,{/})|{\n});
  880.                 meswait;
  881.                 });
  882.             };
  883.         
  884.         case    (@nth(Where,1,{/})={cugmes} &&
  885.              @nth(Where,2,{/})=@nth(goto,2,{/}),
  886.             {No},
  887.             {
  888.             %fname @nth(goto,2,{/});%chk @defp;
  889.             case    (CUGFLAG,{No},{GOCUGTOP});
  890.             type({GO }|fname|{\n});
  891.             case    (@CUGMESTOP,
  892.                 {OK},
  893.                 {
  894.                 Where:={cugmes/}|@nth(goto,2,{/})|{/mes};
  895.                 case    (@nth(goto,3,{/}),
  896.                     {mes},{GOcmes},
  897.                     ,{im({Yes})}
  898.                     );
  899.                 },
  900.                 {CUGError},
  901.                 {Where:={};im({No})},
  902.                 {NotRegister},
  903.                 {Where:={};im({No})},
  904.                 {Busy},
  905.                 {Where:={};im({No})},
  906.                 {Maintenance},
  907.                 {Where:={};im({No})},
  908.                 ,
  909.                 {Where:={};im({No})}
  910.                 );
  911.             },
  912.             {Yes},
  913.             {
  914.             case    (@nth(goto,3,{/}),
  915.                 {mes},{GOcmes},
  916.                 ,{im({Yes})}
  917.                 );
  918.             });
  919.         };
  920.  
  921.     %GOmail    {
  922.         case    (@nth(Where,1,{/})={mail},
  923.             {No},
  924.             {
  925.             type({GO MAIL\n});
  926.         /*    type({GO NEWMAIL\n});    */
  927.             wait    (Wtime2,
  928.                 {Where:={};im({No})},
  929.                 {◆番号又はコマンドを入力して下さい◆},
  930.                 {Where:={};im({No})},
  931.                 {現在、サービスは大変混雑しています。},
  932.                 {Where:={};im({No})},
  933.                 {0:その他 E:終了)\n>},
  934.                 {Where:={mail};im({Yes})},
  935.                 {\nMAIL>},
  936.                 {Where:={mail};im({Yes})},
  937.                 );
  938.             },
  939.             {Yes},
  940.             {im({Yes})}
  941.             );
  942.         };
  943.  
  944.     %GONAPnewyear{
  945.         case    (Where={NAPnewyear/text},
  946.             {No},
  947.             {
  948.             case(CUGFLAG,{Yes},{GONIF});
  949.             type({GO NEWYEAR\n});
  950.             wait    (Wtime2,
  951.                 {Where:={};im({No})},
  952.                 {◆番号又はコマンドを入力して下さい◆},
  953.                 {Where:={};im({No})},
  954.                 {1994年大予想\n>},
  955.                 {
  956.                 type({2\n});
  957.                 wait    (Wtime2,
  958.                     {Where:={};im({No})},
  959.                     { 2. 送信(\)\n 3. NAPLPS(\)\n>},
  960.                     {
  961.                     type({3\n});
  962.                     wait    (Wtime2,
  963.                         {Where:={};im({No})},
  964.                         { 1. 初日の出  2. 富士山\n>},
  965.                         {Where:=goto;im({Yes})}
  966.                         );
  967.                     });
  968.                 });
  969.             },
  970.             {Yes},
  971.             {im({Yes})}
  972.             );
  973.         };
  974.  
  975.     %GOnewyear{
  976.         case    (Where={newyear/text},
  977.             {No},
  978.             {
  979.             case(CUGFLAG,{Yes},{GONIF});
  980.             type({GO NEWYEAR\n});
  981.         /*    type({GO NEWMAIL\n});    */
  982.             wait    (Wtime2,
  983.                 {Where:={};im({No})},
  984.                 {◆番号又はコマンドを入力して下さい◆},
  985.                 {Where:={};im({No})},
  986.                 {1994年大予想\n>},
  987.                 {
  988.                 type({2\n});
  989.                 wait    (Wtime2,
  990.                     {Where:={};im({No})},
  991.                     { 2. 送信(\)\n 3. NAPLPS(\)\n>},
  992.                     {
  993.                     type({2\n});
  994.                     wait    (Wtime2,
  995.                         {Where:={};im({No})},
  996.                         {2:アップロード E:終了)\n>},
  997.                         {Where:=goto;im({Yes})}
  998.                         );
  999.                     });
  1000.                 });
  1001.             },
  1002.             {Yes},
  1003.             {im({Yes})}
  1004.             );
  1005.         };
  1006.  
  1007.     %GOwpnc    {
  1008.         case    (@nth(Where,1,{/})={wpnc},
  1009.             {No},
  1010.             {
  1011.             case(CUGFLAG,{Yes},{GONIF});
  1012.             type({GO WPNCSEND\n});
  1013.             wait    (Wtime2,
  1014.                 {Where:={};im({No})},
  1015.                 {◆番号又はコマンドを入力して下さい◆},
  1016.                 {Where:={};im({No})},
  1017.                 {2:アップロード  E:終了)\n>},
  1018.                 {Where:={wpnc};im({Yes})},
  1019.                 );
  1020.             },
  1021.             {Yes},
  1022.             {im({Yes})}
  1023.             );
  1024.         };
  1025.  
  1026.     %GOcenter{
  1027.         case    (@nth(Where,1,{/})={center},
  1028.             {No},
  1029.             {
  1030.             case(CUGFLAG,{Yes},{GONIF});
  1031.             type({GO CENTER\n});
  1032.             wait    (Wtime2,
  1033.                 {Where:={};im({No})},
  1034.                 {◆番号又はコマンドを入力して下さい◆},
  1035.                 {Where:={};im({No})},
  1036.                 {センター宛メール    FEEDBACK or CENTER\n},
  1037.                 {WAITABORT(Wtime2);Where:={center};im({Yes})},
  1038.                 );
  1039.             },
  1040.             {Yes},
  1041.             {im({Yes})}
  1042.             );
  1043.         };
  1044.  
  1045.     %GOhp    {
  1046.         case    (@nth(Where,1,{/})={hp},
  1047.             {No},
  1048.             {
  1049.             case(CUGFLAG,{Yes},{GONIF});
  1050.             type({GO HP\n});
  1051.             WAITCHAR(Wtime2,{2. ご案内\n>},{type({1\n})});
  1052.             wait    (Wtime2,{Where:={};im({No})},
  1053.                 {御利用頂けません-},
  1054.                 {WAITABORT(Wtime2);Where:={};im({No})},
  1055.                 {:自分のHP)\n:},
  1056.                 {type(@nth(goto,2,{/}));type({\n});
  1057.             wait    (Wtime2,{Where:={};im({No})},
  1058.                 {◆該当する利用者のHome Partyはありません◆\n},
  1059.                 {
  1060.                 WAITCHAR(Wtime2,{2. ご案内\n>},{});
  1061.                 SNDMSG({okasi_f.snd});
  1062.                 display({HPのIDが違っています\n});
  1063.                 Where:={};
  1064.                 im({No});
  1065.                 },
  1066.                 {現在、サービスは大変混雑しています},
  1067.                 {
  1068.                 WAITCHAR(Wtime2,{2. ご案内\n>},{});
  1069.                 SNDMSG({okasi_f.snd});
  1070.                 display({NIFTYが混雑しています\n});
  1071.                 Where:={};
  1072.                 im({No});
  1073.                 },
  1074.                 {(1:設定する  2:しない)\n:},
  1075.                 {
  1076.                 type({2\n});
  1077.                 WAITABORT(Wtime2);
  1078.                 Where:={};
  1079.                 im({No});
  1080.                 },
  1081.                 {パスワード\n:},
  1082.                 {
  1083.                 var    flg    [5];
  1084.                 flg:={OK};
  1085.                 loop    ({
  1086.                     type(@nth(goto,3,{/}));type({\n});
  1087.                     wait    (Wtime2,
  1088.                         {AbortOff({\nホストの反応が}|
  1089.                             {鈍いよぉ~\n})},
  1090.                         {\nHP>},
  1091.                         {Where:=goto;im({No})},
  1092.                         {パスワード\n:},
  1093.                         {flg:={Error};im({Yes})},
  1094.                         {2. ご案内\n>},{im({No})}
  1095.                         );
  1096.                     });
  1097.                 case(flg,{Error},{Where:={}});
  1098.                 im(Where=goto);
  1099.                 },
  1100.                 {◆入力データエラー◆},
  1101.                 {
  1102.                 SNDMSG({okasi_f.snd});
  1103.                 display({\nHPのIDが違っています\n});
  1104.                 type({XYZ99999\n});
  1105.                 WAITABORT(Wtime2);
  1106.                 Where:={};
  1107.                 im({No});
  1108.                 },
  1109.                 {\nHP>},{Where:=goto;im({Yes})}
  1110.                 );
  1111.                 });
  1112.             },
  1113.             {Yes},
  1114.             {
  1115.             case    (@nth(Where,2,{/})=@nth(goto,2,{/}),
  1116.                 {Yes},{im({Yes})},
  1117.                 {No},{MOVEhp}
  1118.                 );
  1119.             });
  1120.         };
  1121.  
  1122.     %MOVEhp    {
  1123.         type({MOV\n});
  1124.         wait    (Wtime2,
  1125.             {Where:={};im({No})},
  1126.             {ID (改行のみ:自分のHP)\n:},
  1127.             {
  1128.             type(@nth(goto,2,{/}));type({\n});
  1129.             wait    (Wtime2,
  1130.                 {Where:={};im({No})},
  1131.                 {パスワード\n:},
  1132.                 {
  1133.                 var    flg    [5];
  1134.                 flg:={OK};
  1135.                 loop    ({
  1136.                     type(@nth(goto,3,{/}));type({\n});
  1137.                     wait    (Wtime2,
  1138.                         {Where:={};im({No})},
  1139.                         {\nHP>},
  1140.                         {Where:=goto;im({No})},
  1141.                         {パスワード\n:},
  1142.                         {flg:={Error};im({Yes})}
  1143.                         );
  1144.                     });
  1145.                 case(flg,{Error},{Where:={}});
  1146.                 im(Where=goto);
  1147.                 },
  1148.                 {する利用者のHome Partyはありません◆\nHP>},
  1149.                 {
  1150.                 SNDMSG({okasi_f.snd});
  1151.                 display({\nHPのIDが違っています\n});
  1152.                 Where:={};
  1153.                 im({No});
  1154.                 },
  1155.                 {◆入力データエラー◆},
  1156.                 {
  1157.                 SNDMSG({okasi_f.snd});
  1158.                 display({\nHPのIDが違っています\n});
  1159.                 type({ZZZ99999\n});
  1160.                 WAITABORT(Wtime2);
  1161.                 Where:={};
  1162.                 im({No});
  1163.                 },
  1164.                 {\nHP>},{Where:=goto;im({Yes})}
  1165.                 );
  1166.             });
  1167.         };
  1168.  
  1169.     %GOpatio{
  1170.         case    (@nth(Where,1,{/})={patio}&&
  1171.              @nth(Where,2,{/})=@nth(goto,2,{/}),
  1172.             {No},
  1173.             {
  1174.             case(CUGFLAG,{Yes},{GONIF});
  1175.             type({GO PATIO\n});
  1176.             WAITCHAR(Wtime2,{ 1. ご案内     2. サービスに入る\n>},
  1177.                     {type({2\n})});
  1178.             WAITCHAR(Wtime2,{:自分のパティオ)\n:},
  1179.                     {type(@nth(goto,2,{/}));type({\n})});
  1180.             wait    (Wtime2,
  1181.                 {Where:={};im({No})},
  1182.                 {◆該当するパティオはありません◆\n},
  1183.                 {
  1184.                 WAITCHAR(Wtime2,{2. サービスに入る\n>},{});
  1185.                 SNDMSG({okasi_f.snd});
  1186.                 display({パティオのIDが違っています\n});
  1187.                 Where:={};
  1188.                 im({No});
  1189.                 },
  1190.                 {(1: 設定する  2: しない)\n:},
  1191.                 {
  1192.                 SNDMSG({okasi_f.snd});
  1193.                 display({パティオのIDが違っています\n});
  1194.                 type({2\n});
  1195.                 WAITABORT(Wtime2);
  1196.                 Where:={};
  1197.                 im({No});
  1198.                 },
  1199.                 {パスワード\n:},
  1200.                 {
  1201.                 loop    ({
  1202.                     type(@nth(goto,3,{/}));type({\n});
  1203.                     wait    (Wtime2,
  1204.                         {Where:={};im({No})},
  1205.                         {パスワード\n:},
  1206.                         {im({Yes})},
  1207.                         {2. サービスに入る\n>},
  1208.                         {
  1209.                         SNDMSG({okasi_f.snd});
  1210.                         display(@nth(goto,2,{/})|
  1211.                         {のパスワードが違います\n});
  1212.                         Where:={};
  1213.                         im({No});
  1214.                         },
  1215.                         { (未読)  最新  会議室名},
  1216.                         {
  1217.                         WAITABORT(Wtime2);
  1218.                         type({SET DLM ON\n});
  1219.                         WAITABORT(Wtime2);
  1220.                         type(@nth(goto,5,{/}));
  1221.                         type({\n});
  1222.                         wait    (Wtime2,
  1223.                             {Where:={}},
  1224.                             {◆該当する会議室が}|
  1225.                             {ありません},
  1226.                             {Where:={}},
  1227.                             {\n>},
  1228.                             {Where:=goto},
  1229.                             {\nPATIO(N)>},
  1230.                             {Where:=goto},
  1231.                             {\nPATIO(R)>},
  1232.                             {Where:=goto},
  1233.                             {\nPATIO(P)>},
  1234.                             {Where:=goto}
  1235.                             );
  1236.                         im({No});
  1237.                         },
  1238.                         {(1: 同意する  2: しない)\n:},
  1239.                         {
  1240.                         type({1\n});
  1241.                         WAITCHAR(Wtime2,
  1242.                             {改行で登録名)\n:},{});
  1243.                         type(HANDLE|{\n});
  1244.                         WAITCHAR(Wtime2,
  1245.                             {(1:OK  2:NG)\n:},{});
  1246.                         type({1});
  1247.                         im({No});
  1248.                         });
  1249.                     });
  1250.                 im(Where=goto);
  1251.                 });
  1252.             },
  1253.             {Yes},{im({Yes})}
  1254.             );
  1255.         };
  1256.  
  1257.     case    (@nth(goto,1,{/}),
  1258.         {forum},{GOforum},
  1259.         {cugmes},{GOcugmes},
  1260.         {hp},    {GOhp},
  1261.         {patio},{GOpatio},
  1262.         {mail},    {GOmail},
  1263.         {wpnc},    {GOwpnc},
  1264.         {center},{GOcenter},
  1265.         {newyear},{GOnewyear},
  1266.         {NAPnewyear},{GONAPnewyear},
  1267.         ,{im({No})}
  1268.         );
  1269.     };
  1270.  
  1271. /*    NIFTY内の任意の場所からトップメニューに戻る    */
  1272. %gotoTOP{
  1273.     [mode]
  1274.     chat({No});
  1275.     dispoff(!DEBUG);
  1276.     %te    @case(mode=0||(mode=1&&FREE1==1&&!(PAD={None}&&
  1277.         (MAILDOWN={No}||(MLcnt==0&&MAILDEL={No}&&CHKSDL={No}))&&
  1278.         @filechk(UP2|{_FORUM.CTL})={No}&&WEATHER={No}&&
  1279.         (@filechk(UP2|{fapxup.ctl})={No}||UPT={No})&&
  1280.         ((@filechk(UP2|{fapxdown.ctl})={No}&&
  1281.         @filechk(UP2|{fapxrtn.ctl})={No})||DNT={No})&&
  1282.         DONIFTY={No}&&CHKBILL={No}&&NewsDown={No}))||
  1283.         (mode=1&&FREE1==2&&(
  1284.         (UPT={last}&&@filechk(UP2|{fapxup.ctl})={Yes})||
  1285.         (DNT={last}&&(
  1286.             @filechk(UP2|{fapxdown.ctl})={Yes}||
  1287.             @filechk(UP2|{fapxrtn.ctl})={Yes})))),
  1288.         {Yes},{im(0)},{No},{im(1)});
  1289.     %lpv    @loop    ({
  1290.         case(te,0,{type({/TT\n})},1,{type({/E\n})});
  1291.         im({No});
  1292.         wait    (Wtime2,
  1293.             {break;WAITABORT(Wtime2);im({Yes})},
  1294.             {◆正しい番号を入力してください◆\n}|
  1295.             {確認 (1:OK  2:NG)\n:},
  1296.             {
  1297.             type({2\n});WAITABORT(Wtime2);
  1298.             type({\n});WAITABORT(Wtime2);
  1299.             type({\n});
  1300.             WAITCHAR(Wtime2,{番号},{break;WAITABORT(Wtime2)})
  1301.             },
  1302.             {確認 (1:OK  2:NG)\n:},
  1303.             {
  1304.             type({2\n});WAITABORT(Wtime2);
  1305.             type({\n});WAITABORT(Wtime2);
  1306.             type({\n});
  1307.             WAITCHAR(Wtime2,{番号},{break;WAITABORT(Wtime2)})
  1308.             },
  1309.             {◆入力データエラー◆\n}|
  1310.             {日付 (YYMMDD  改行で日付省略)\n:},
  1311.             {type({\n});break;WAITABORT(Wtime2)},
  1312.             {◆入力データエラー◆\n}|
  1313.             {ID (改行のみ:自分のパティオ)\n:},
  1314.             {
  1315.             type({E\n});
  1316.             wait    (Wtime2,
  1317.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1318.                 {\n>},,
  1319.                 {◆入力データエラー◆},
  1320.                 {
  1321.                 WAITABORT(Wtime2);type({E\n});
  1322.                 WAITABORT(Wtime2)
  1323.                 })
  1324.             },
  1325.             {◆パスワードが間違っています◆\nパスワード\n:},
  1326.             {
  1327.             type({\n});
  1328.             wait    (Wtime2,
  1329.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1330.                 {\n>},,
  1331.                 {◆パスワードが間違っています◆},
  1332.                 {
  1333.                 WAITABORT(Wtime2);type({\n});
  1334.                 WAITABORT(Wtime2)
  1335.                 })
  1336.             },
  1337.             {\nmore>},
  1338.             {type({E\n});WAITABORT(Wtime2)},
  1339.             {E:終了)\n:},
  1340.             {type({E\n});WAITABORT(Wtime2)},
  1341.             {続き(改行のみ:次頁)\n>},
  1342.             {type({E\n});WAITABORT(Wtime2)},
  1343.             {◆正しい番号を入力してください◆},
  1344.             {WAITABORT(Wtime2);type({E\n});WAITABORT(Wtime2)},
  1345.             {\n:},
  1346.             {type({\n});WAITABORT(Wtime2)},
  1347.             {◆番号又はコマンドを入力して下さい},
  1348.             {WAITABORT(Wtime2)},
  1349.             {◆コマンドを入力して},
  1350.             {WAITABORT(Wtime2)},
  1351.             {◆正しいコマンドを入力して下さい},
  1352.             {WAITABORT(Wtime2)},
  1353.             {◆入力データエラー},
  1354.             {
  1355.             wait    (Wtime2,
  1356.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1357.                 {改行で終了)\n:},
  1358.                 {type({\n});WAITABORT(Wtime2)},,
  1359.                 {WAITABORT(Wtime2)}
  1360.                 )
  1361.             },
  1362.             {\n>},,
  1363.             {NIFTY-Serve     TOP},
  1364.             {break;CUGFLAG:={No};WAITABORT(Wtime2);im({top})},
  1365.             {NIFTY-Serve    TOP},
  1366.             {break;CUGFLAG:={No};WAITABORT(Wtime2);im({top})},
  1367.             CUGTOPMENU,
  1368.             {break;CUGFLAG:={Yes};WAITABORT(Wtime2);im({top})},
  1369.             {CUG トップ},/* CUG */
  1370.             {break;WAITABORT(Wtime2);GONIF;im({top})},
  1371.             )
  1372.         });
  1373.     case(lpv={No}&&te=0,
  1374.         {Yes},
  1375.         {
  1376.         type({TT\n});
  1377.         WAITCHAR(Wtime2,{TT\n},
  1378.             {wait    (Wtime2,
  1379.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1380.                 {NIFTY-Serve     TOP},
  1381.                 {break;CUGFLAG:={No};WAITABORT(Wtime2)},
  1382.                 {NIFTY-Serve    TOP},
  1383.                 {break;CUGFLAG:={No};WAITABORT(Wtime2)},
  1384.                 CUGTOPMENU,
  1385.                 {break;CUGFLAG:={Yes};WAITABORT(Wtime2)},
  1386.                 {CUG トップ},/* CUG */
  1387.                 {break;WAITABORT(Wtime2);GONIF},
  1388.                 );
  1389.             });
  1390.         });
  1391.     case(te=0&&(lpv={No}||lpv={TOP}),
  1392.         {Yes},
  1393.         {
  1394.         type({SET FF OFF\n});    WAITABORT(Wtime2);
  1395.         type({SET MENU ON\n});    WAITABORT(Wtime2);
  1396.         type({SET PAGE OFF\n});    WAITABORT(Wtime2);
  1397.         type({SET DLM ON\n});    WAITABORT(Wtime2);    DLMFLAG:={Yes};
  1398.         });
  1399.     dispoff({No});
  1400.     };
  1401.  
  1402. /*    割引時間帯かどうかを判定する    */
  1403. %discntime{
  1404.     [dt]    /* @daylong形式 */
  1405.     %hhmm    @getchar(dt,16,2)|@getchar(dt,19,2);
  1406.     %time2    @getchar(ACCESS2,1,2)|@getchar(ACCESS2,4,2);
  1407.     im(hhmm>=0300 && hhmm<=1159 && hhmm<=time2);
  1408.     };
  1409.  
  1410. /************************************************************************
  1411. *    ダイヤリング開始処理                        *
  1412. *************************************************************************/
  1413. /*  type @p */
  1414. %typeCNIF{
  1415.     N2:=0;
  1416.     loop    ({
  1417.         type({C NIF\n});
  1418.         wait    (Wtime2,
  1419.             {im({TimeOut})},
  1420.             {HOST NAME?\n*},
  1421.             {case    (N2<5,    {No},{im({RetryOver})},
  1422.                     {Yes},{im({Yes})})},
  1423.             {Enter},
  1424.             {im({Connect})},
  1425.             {本日は定期メンテナンス},
  1426.             {im({Maintenance})}
  1427.             );
  1428.         N2:=N2+1;
  1429.         });
  1430.     };
  1431.  
  1432. %Road2p    {
  1433.     wait    (6,{type({@P\n})});
  1434.     wait    (Wtime2,{im({TimeOut})},
  1435.         {HOST NAME?\n*},{TELNO:=road2;APTYPE:={2};typeCNIF});
  1436.     };
  1437.  
  1438. %Road3    {
  1439.     wait    (Wtime2,{im({TimeOut})},
  1440.         {ROAD 3\n\nHOST NAME?\n*},{TELNO:=road3;APTYPE:={3};typeCNIF},
  1441.         {ROAD 4\n\nHOST NAME?\n*},{TELNO:=road3;APTYPE:={4};typeCNIF}
  1442.         );
  1443.     };
  1444.  
  1445. /*  type .00+ and retry */
  1446. %type00    {
  1447.     N2:=0;
  1448.     loop    ({
  1449.         wait(2);
  1450.         type({.00+});
  1451.         wait    (Wtime2,
  1452.             {im({TimeOut})},
  1453.             {71+},
  1454.             {im({Maintenance})},
  1455.             {46+},
  1456.             {case    (N2<5,    {No},{im({RetryOver})},
  1457.                     {Yes},{im({Yes})})},
  1458.             {+\n00+},
  1459.             {case    (N2<5,    {No},{im({RetryOver})},
  1460.                     {Yes},{im({Yes})})},
  1461.             {Enter},
  1462.             {TELNO:=@head(road1,{/});APTYPE:={1};im({Connect})},
  1463.             {Host is not in service},
  1464.             {im({Maintenance})},
  1465.             {Please call again},
  1466.             {im({Maintenance})},
  1467.             {本日は定期メンテナンス},
  1468.             {im({Maintenane})}
  1469.             );
  1470.         N2:=N2+1;
  1471.         });
  1472.     };
  1473.  
  1474. %callrd1{
  1475.     N31:=N31+1;
  1476.     road1:=@nth(ROAD1,N31,{;});
  1477.     case    (road1={},{Yes},{N31:=0});
  1478.     case    (N1>REDIAL,
  1479.         {Yes},{im({RedialOver})},
  1480.         {No},
  1481.         {
  1482.         case    (@head(road1,{/})={},
  1483.             {Yes},
  1484.             {im({NoTelephone})},
  1485.             {No},
  1486.             {
  1487.             N1:=N1+1;
  1488.             display({\nROAD1に電話をかけます\n});
  1489.             case    (@nth(road1,2,{/})={1200},
  1490.                 {Yes},
  1491.                 {
  1492.                 baud(1200);
  1493.                 discon;
  1494.                 type({ATZ\n});
  1495.                 wait(Wtime1,,{OK\n},);
  1496.                 dialone({AT}|@nth(MODEM,1,{/})|{D}|DIAL|
  1497.                     @nth(road1,1,{/}),type00,{im({Busy})});
  1498.                 },
  1499.                 {No},
  1500.                 {
  1501.                 case(@getchar(@nth(MODEM,2,{_}),1,4)={1200},
  1502.                     {Yes},
  1503.                     {
  1504.                     baud(1200);
  1505.                     discon;
  1506.                     type({ATZ\n});
  1507.                     wait(Wtime1,,{OK\n},);
  1508.                     dialone({AT}|@nth(MODEM,1,{/})|{D}|
  1509.                         DIAL|@nth(road1,1,{/}),
  1510.                         type00,{im({Busy})});
  1511.                     },
  1512.                     {No},
  1513.                     {
  1514.                     baud(2400);
  1515.                     discon;
  1516.                     type({ATZ\n});
  1517.                     wait(Wtime1,,{OK\n},);
  1518.                     dialone({AT}|@nth(MODEM,1,{/})|
  1519.                         @nth(MODEM,2,{/})|{D}|DIAL|
  1520.                         @nth(road1,1,{/}),
  1521.                         type00,{im({Busy})});
  1522.                     });
  1523.                 });
  1524.             });
  1525.         });
  1526.     };
  1527.  
  1528. %callrd2{
  1529.     N32:=N32+1;
  1530.     road2:=@nth(ROAD2,N32,{;});
  1531.     case    (road2={},{Yes},{N32:=0});
  1532.     case    (N1>REDIAL,
  1533.         {Yes},
  1534.         {im({RedialOver})},
  1535.         {No},
  1536.         {
  1537.         case    (road2={},
  1538.             {Yes},{im({NoTelephone})},
  1539.             {No},
  1540.             {
  1541.             N1:=N1+1;
  1542.             display({\nROAD2に電話をかけます\n});
  1543.             case(@getchar(@nth(MODEM,2,{_}),1,4)={1200},
  1544.                 {Yes},{baud(1200)},{No},{baud(2400)});
  1545.             discon;
  1546.             type({ATZ\n});
  1547.             wait(Wtime1,,{OK\n},);
  1548.             dialone({AT}|@nth(MODEM,1,{/})|@nth(MODEM,2,{/})|{D}|
  1549.                 DIAL|road2,Road2p,{im({Busy})});
  1550.             });
  1551.         });
  1552.     };
  1553.  
  1554. %callrd3{
  1555.     N33:=N33+1;
  1556.     road3:=@nth(ROAD3,N33,{;});
  1557.     case    (road3={} && N33>1,
  1558.         {Yes},{N33:=1;road3:=@nth(ROAD3,N33,{;})});
  1559.     case    (N1>REDIAL,
  1560.         {Yes},
  1561.         {im({RedialOver})},
  1562.         {No},
  1563.         {
  1564.         case    (road3={},
  1565.             {Yes},{im({NoTelephone})},
  1566.             {No},
  1567.             {
  1568.             N1:=N1+1;
  1569.             display({\nROAD3/4に電話をかけます\n});
  1570.             case    (@getchar(@nth(MODEM,2,{_}),1,4),
  1571.                 {1200},{baud(1200)},
  1572.                 {2400},{baud(2400)},
  1573.                 {4800},{baud(4800)},
  1574.                 {9600},{case    (RD3SPEED,
  1575.                         {4800},{baud(4800)},
  1576.                         {9600},{baud(9600)},
  1577.                         {19200},{baud(9600)},
  1578.                         ,{baud(4800)})},
  1579.                 {1440},{case    (RD3SPEED,
  1580.                         {4800},{baud(4800)},
  1581.                         {9600},{baud(9600)},
  1582.                         {19200},{baud(9600)},
  1583.                         ,{baud(4800)})},
  1584.                 {1920},{case    (RD3SPEED,
  1585.                         {4800},{baud(4800)},
  1586.                         {9600},{baud(9600)},
  1587.                         {19200},{baud(19200)},
  1588.                         ,{baud(4800)})}
  1589.                 );
  1590.             discon;
  1591.             type({ATZ\n});
  1592.             wait(Wtime1,,{OK\n},);
  1593.             dialone({AT}|@nth(MODEM,1,{/})|@nth(MODEM,2,{/})|{D}|
  1594.                 DIAL|road3,Road3,{im({Busy})});
  1595.             });
  1596.         });
  1597.     };
  1598.  
  1599. %DIALING{
  1600.     N1:=0;
  1601.     N31:=0;    N32:=0;    N33:=0;
  1602.     loop    ({
  1603.         case    (AP3={Yes},
  1604.             {Yes},
  1605.             {
  1606.             case    (@callrd3,
  1607.                 {Connect},{im({No})},
  1608.                 {Maintenance},
  1609.                 {AbortOff({NIFTYがメンテナンス中です\n})},
  1610.                 {RedialOver},
  1611.                 {Abort({\n}|REDIAL|
  1612.                     {回かけても電話がつながりません\n})},
  1613.                 {NoTelephone},{im({No})},
  1614.                 ,{im({Yes})}
  1615.                 );
  1616.             },
  1617.             {No},
  1618.             {
  1619.             case    (@callrd2,
  1620.                 {Connect},{im({No})},
  1621.                 {Maintenance},
  1622.                 {AbortOff({NIFTYがメンテナンス中です\n})},
  1623.                 {RedialOver},
  1624.                 {Abort({\n}|REDIAL|
  1625.                     {回かけても電話がつながりません\n})},
  1626.                 ,
  1627.                 {
  1628.                 case    (@callrd1,
  1629.                     {Connect},{im({No})},
  1630.                     {Maintenance},
  1631.                     {AbortOff({NIFTYがメンテナンス}|
  1632.                         {中です\n})},
  1633.                     {RedialOver},
  1634.                     {Abort({\n}|REDIAL|
  1635.                         {回かけても電話が}|
  1636.                         {つながりません\n})},
  1637.                     ,{im({Yes})}
  1638.                     );
  1639.                 });
  1640.             });
  1641.         });
  1642.     };
  1643.  
  1644. /************************************************************************
  1645. *    ログイン開始処理                        *
  1646. *************************************************************************/
  1647. %AUTOLOGIN
  1648.     {
  1649.     %MSGCHK    {
  1650.         %msgfile @case(@filechk(LOG2|{LASTLOG\}|ID|{.MSG}),{Yes},
  1651.             {im(LOG2|{LASTLOG\}|ID|{.MSG})},{No},
  1652.             {case(@filechk(LOG2|{LASTLOG\_DEFAULT.MSG}),{Yes},
  1653.             {im(LOG2|{LASTLOG\_DEFAULT.MSG})},{No},{im({})})});
  1654.         case(msgfile,{},{im({No})},,
  1655.             {
  1656.             %msg @head(@body(@read(msgfile),
  1657.                 {定期メンテナンスのため、}),{まで、\n}|
  1658.                 {センターのサービスを停止});
  1659.             case(msg,{},{im({No})},,
  1660.                 {
  1661.                 %mday    @ZERO(@head(msg,{月})+1-1,2)|{/}|
  1662.                     @ZERO(@head(msg,{月},{日})+1-1,2);
  1663.                 %msg    @tail(msg,{)});
  1664.                 case(@getchar(@daylong,6,5),mday,
  1665.                     {
  1666.                     %tc    {[time]
  1667.                         %g @case(@getchar(time,1,4),
  1668.                             {午前},{im({0})},
  1669.                             {午後},{im({12})});
  1670.                         %t @ZERO(@getchar(time,5,2),2);
  1671.                         %m @getchar(time,9,2);
  1672.                         im(t+g|m)
  1673.                         };
  1674.                     %hhmm    @getchar(@daylong,16,2)|
  1675.                         @getchar(@daylong,19,2);
  1676.                     %m1    @head(msg,{から});
  1677.                     %m2    @tail(msg,{から});
  1678.                     %time1    @tc(@head(msg,{から}));
  1679.                     %time2    @tc(@tail(msg,{から}));
  1680.                     im(hhmm>=time1 && hhmm<=time2);
  1681.                     },,{im({No})});
  1682.                 });
  1683.             });
  1684.         };
  1685.     display({NIFTYへの接続を開始します\n\n});
  1686.     footnote({NIFTYへの接続処理をしています});
  1687.     initmode;                /* 各種初期設定 */
  1688.     case    (ID<>{} && @filechk(CDIR2|ID|{.CUG}),{Yes},
  1689.         {%SetCUG {setcdir(CDIR);#}|ID|{.CUG};SetCUG});
  1690.     case    (ROAD3,{},{AP3:={No}});
  1691.     case    (ROAD3<>{}&&@head(ROAD1,{/})={}&&ROAD2={},{Yes},{AP3:={Yes}});
  1692.     case    ((ID={})||
  1693.          (AP3={Yes}&&ROAD3={})||
  1694.          (AP3<>{Yes}&&@head(ROAD1,{/})={}&&ROAD2={}),
  1695.         {Yes},
  1696.         {AbortOff({電話番号かユーザーIDが指定されていません})},
  1697.         {No},
  1698.         {
  1699.         case(@MSGCHK,{Yes},
  1700.         {
  1701.         display({NIFTYがメンテナンス中と思われますので、}|
  1702.             {接続処理を中止します。\n});
  1703.         RETCD:={Cancel};wait(1);
  1704.         },
  1705.         {No},{DIALING;
  1706.         WAITCHAR(Wtime2,{Connection-ID  --->},{type({SVC\n})});
  1707.         wait    (Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1708.             {Enter User-ID  --->},
  1709.             {
  1710.             type(ID|{\n});
  1711.             UID:=ID;
  1712.             },
  1713.             {\n INPUT Error},
  1714.             {AbortOff(
  1715.                 {\nあれぇ?『SVC』受け付けてくれないよぉ~\n})}
  1716.             );
  1717.         wait    (Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1718.             {Enter Password --->},
  1719.             {
  1720.             case    (PassWord={*}||PassWord={},
  1721.                 {Yes},
  1722.                 {
  1723.                 SNDMSG({nyuryo_f.snd});
  1724.                 chat({Yes});
  1725.                 sendtype({Ch/2});
  1726.                 footnote({パスワードを入力してください});
  1727.                 wait    (,,
  1728.                     {\n\n},
  1729.                     {
  1730.                     Stime:=@linetime;
  1731.                     chat({No});
  1732.                     sendtype({Line});
  1733.                     });
  1734.                 footnote({});
  1735.                 },
  1736.                 {No},
  1737.                 {type(PassWord);type({\n});Stime:=@linetime;}
  1738.                 );
  1739.             delfile(TEMP2|{fmsg.tmp});receive(TEMP2|{fmsg.tmp});
  1740.             wait    (Wtime2,
  1741.                 {
  1742.                 stoprec;
  1743.                 AbortOff({\nホストの反応が鈍いよぉ~\n});
  1744.                 },
  1745.                 {\n Password ERROR},
  1746.                 {
  1747.                 stoprec;type({E\n});
  1748.                 AbortOff(
  1749.                     {\nパスワードがおかしいですよ?\n})},
  1750.                 {\n前回LOG OUT},{CHKLASTLOG}
  1751.                 );
  1752.         loop    ({
  1753.             wait    (Wtime2,
  1754.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1755.                 {通)--},
  1756.                 {
  1757.                 MLcnt:=@head(@body(@laststr,
  1758.                     {(未読分}),{通)-})+1-1;
  1759.                 im({Yes});
  1760.                 },
  1761.                 {NIFTY-Serve     TOP},
  1762.                 {CUGFLAG:={No};WAITABORT(Wtime2)},
  1763.                 {NIFTY-Serve    TOP},
  1764.                 {CUGFLAG:={No};WAITABORT(Wtime2)},
  1765.                 CUGTOPMENU,
  1766.                 {CUGFLAG:={Yes};WAITABORT(Wtime2)},
  1767.                 {CUG トップ},
  1768.                 {WAITABORT(Wtime2);GONIF},
  1769.                 {\n今週のお知らせ    NEW\n},
  1770.                 {
  1771.                 case    (READNEW,
  1772.                     {Idx},{NewIDX},
  1773.                     {New},{NewsDown:={Yes}}
  1774.                     );
  1775.                 type({\n});im({Yes});
  1776.                 },
  1777.                 {\n>},
  1778.                 {
  1779.                 case(CUGFLAG,{},{stoprec},{No},
  1780.                     {case(TOPON,{No},{im({No})},,
  1781.                         {type({\n});WAITABORT(Wtime2)})
  1782.                     });
  1783.                 });
  1784.             });
  1785.             type({SET FF OFF\n});WAITABORT(Wtime2);
  1786.             type({SET MENU ON\n});WAITABORT(Wtime2);
  1787.             type({SET PAGE OFF\n});WAITABORT(Wtime2);
  1788.             },
  1789.             {\n User-ID Error},
  1790.             {AbortOff({\nIDが間違ってませんか?\n})},
  1791.             ,{AbortOff({\nNIFTYがおかしいてず(T_T)\n})}
  1792.             );
  1793.             });
  1794.         });
  1795.     Where:={};
  1796.     };
  1797.  
  1798. /************************************************************************/
  1799. /*    NIFTYの割引料金時間帯に自動実行開始する            */
  1800. /************************************************************************/
  1801. %WAIT3AM{
  1802.     footnote({3:00am - 7:59amの間に自動通信を開始します。});
  1803.     %nowhh    @getchar(@daylong,16,2);
  1804.     case    (nowhh>=3 && nowhh<=7,
  1805.         {Yes},    {RETCD:={Start}},
  1806.         {No},    {WAITS({03:10})}
  1807.         );
  1808.     };
  1809.  
  1810. %WAITSETTIME{
  1811.     %access    ACCESS;
  1812.     footnote({通信開始時刻を設定してください});
  1813.     loop    ({
  1814.         SNDMSG({nyuryo_f.snd});
  1815.         %a @plane(
  1816.             {c通信開始時刻を指定してください [HH:MM]\n}|
  1817.             {c  現在時刻は }|@getchar(@daylong,16,5)|{ です\n}|
  1818.             {t  設定時刻        /xxxxx\n}|
  1819.             {s                  / 設定 / 取消 / 即時 \n},
  1820.             access);
  1821.         %access    @head(@getline(a,1,1),{\n});
  1822.         %ok    @head(@getline(a,2,1),{\n});
  1823.         case    (ok,
  1824.             { 1},
  1825.             {
  1826.             case    (@getchar(access,1,2)>=0  &&
  1827.                  @getchar(access,1,2)<=23 &&
  1828.                  @getchar(access,3,1)={:} &&
  1829.                  @getchar(access,4,2)>=00 &&
  1830.                  @getchar(access,4,2)<=59,
  1831.                 {Yes},{ACCESS:=access;WAITS(access);im({No})},
  1832.                 {No},{im({Yes})}
  1833.                 );
  1834.             },
  1835.             { 2},
  1836.             {RETCD:={Cancel};im({No})},
  1837.             { 3},
  1838.             {RETCD:={Start};im({No})},
  1839.             ,{im({Yes})}
  1840.             );
  1841.         });
  1842.     };
  1843.     
  1844. %WAITS    {
  1845.     [access]
  1846.     var    waits    [6];
  1847.     %hh    @getchar(access,1,2);
  1848.     %mm    @getchar(access,4,2);
  1849.     loop    ({
  1850.         %now    @daylong;
  1851.         %nowhh    @getchar(now,16,2);
  1852.         %nowmm    @getchar(now,19,2);
  1853.         %nowss    @getchar(now,22,2);
  1854.         waits:=    ((hh*60+mm)*60)    - ((nowhh*60+nowmm)*60+nowss);
  1855.         case    (waits<(-60),{Yes},{waits:=waits+24*60*60});
  1856.         case    (waits<0,{Yes},{waits:=1});
  1857.         footnote(access|{に自動通信を開始します。}|
  1858.             {  PF5:即時開始  PF10:通信メニューへ});
  1859.         waitx    (waits);
  1860.         case    (@xtype,
  1861.             {-2},    /* 指定時刻 */
  1862.             {SNDMSG({jikan_f.snd});RETCD:={Start};im({No})},
  1863.             {110},    /* PF10 通信メニューへ */
  1864.             {RETCD:={Cancel};im({No})},
  1865.             {105},    /* PF5  即時開始指定 */
  1866.             {RETCD:={Start};im({No})},
  1867.             ,{im({Yes})}
  1868.             );
  1869.         });
  1870.     };
  1871.  
  1872. /************************************************************************
  1873. *    NIFTYの今週の天気予報(NAPLPS)を見ながら        *
  1874. *    NAPLPS 画像データを 切り出し 保存 する    処理        *
  1875. *            presented  by -なる-☆早川    (92.12.30)    *
  1876. *            customized by コノミ        (93.03.11)    *
  1877. *************************************************************************/
  1878. %GOWEATHER{
  1879.     [WTHRno,CNTno]
  1880.     footnote({天気予報(NAPLPS) }|WTHRno|{ の }|CNTno|{ を確認中});
  1881.     display({\n今週の天気予報(NAPLPS)を確認します\n});
  1882.     receive(TEMP2|{WEATHER.TMP});
  1883.     case(CUGFLAG,{Yes},{GONIF});
  1884.     type({GO WEATHER\n});
  1885.     Where:={};
  1886. /*    WAITCHAR(Wtime2,{ 7. NAPLPS天気予報\n>},{type({7\n})});    */
  1887.     WAITCHAR(Wtime2,{ 7. NAPLPS天気予報},{WAITABORT(Wtime2);type({7\n})});
  1888.     WAITCHAR(Wtime2,{ 2. サービスに入る\n>},{type({2\n})});
  1889.     case    (WTHRno={},
  1890.         {Yes},    {WAITCHAR(Wtime2*2,{(J},{type({E\n})})},
  1891.         {No},    {WAITCHAR(Wtime2*2,{(J},{type(WTHRno|{\n})});
  1892.              case(CNTno={},
  1893.                 {Yes},    {WAITCHAR(Wtime2*2,{(J},{type({E\n})})},
  1894.                 {No},    {WAITCHAR(Wtime2*2,{(J},
  1895.                             {type(CNTno|{\n})});
  1896.                      WAITCHAR(Wtime2*2,{(J},{type({\n})})}
  1897.             )});
  1898.  
  1899.     WAITCHAR(Wtime2*2,{ 2. サービスに入る\n>},{});
  1900.     stoprec;
  1901.     %file    @crefile(LOG2|{WEATHER},{NPB});
  1902.     %cdir    @getcdir;
  1903.     setcdir(CDIR);
  1904.     dispoff(!DEBUG);
  1905.     command({txl -npcut }|    { -i }|TEMP2|{WEATHER.TMP}|
  1906.                 { -o }|LOG2|{WEATHER\}|file);
  1907.     delfile(TEMP2|{WEATHER.TMP});
  1908.     setcdir(cdir);
  1909.     dispoff({No});
  1910.     display({\n天気予報(NAPLPS)確認処理を完了しました\n});
  1911.     };
  1912.  
  1913. /************************************************************************
  1914. *    NEW(今週のお知らせ)を見る処理                *
  1915. *************************************************************************/
  1916. %GONEW    {
  1917.     var newlist    [60];
  1918.     %preNEW{
  1919.         display({\n今週のお知らせオートダウンの調整を行います\n});
  1920.         dispoff(!DEBUG);
  1921.         display({3回メッセージの調整を行いますm(_ _)m\n});
  1922.         case(CUGFLAG,{Yes},{GONIF});
  1923.         type({GO NEW\n});
  1924.         wait(Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~(T◇T)\n})},
  1925.             {今週のお知らせ    NEW\n\n},{});
  1926.         Where:={};
  1927.         loop    ({
  1928.             wait    (Wtime2,
  1929.                 {AbortOff({\nホストの反応が鈍いよぉ~(T_T)\n})},
  1930.                 {\n>},{im({No})},
  1931.                 {\n},
  1932.                 {
  1933.                 %line1 @tail(@body(@laststr(80),,{\n}),{\n});
  1934.                 %checkline @getchar(line1,7);
  1935.                 write(UP2|{fapxnews.ctl},checkline|CRLF);
  1936.                 case    ((@body(oldnews,checkline)={} &&
  1937.                       @body(oldnews,,checkline)={}) &&
  1938.                      @body(checkline,,{(再掲載)})={},
  1939.                     {Yes},
  1940.                     {case    (newlist={},
  1941.                         {Yes},
  1942.                         {newlist:=@getchar(line1,1,4)
  1943.                                 +1-1},
  1944.                         ,{newlist:=newlist|{,}|
  1945.                             @getchar(line1,1,4)
  1946.                                 +1-1}
  1947.                         );
  1948.                     });
  1949.                 im({Yes});
  1950.                 });
  1951.             });
  1952.         dispoff({No});
  1953.         };
  1954.     type({SET PAGE OFF\n});
  1955.     WAITABORT(Wtime2);
  1956.     case    (READNEW,
  1957.         {New},
  1958.         {
  1959.         case    (@filechk(UP2|{fapxnews.ctl}),
  1960.             {Yes},
  1961.             {
  1962.             %oldnews @read(UP2|{fapxnews.ctl});
  1963.             delfile(UP2|{fapxnews.ctl});
  1964.             preNEW;
  1965.             },
  1966.             {No},{%oldnews {};preNEW}
  1967.             );
  1968.         });
  1969.     footnote({今週のお知らせダウンロード中});
  1970.     display({今週のお知らせをダウンロードします\n});
  1971.     display({\n newlist=}|newlist|{ です。\n});  /*ハ 蛇足!! */
  1972.     LOGforum({NEW},{start});
  1973.     case(CUGFLAG,{Yes},{GONIF});
  1974.     type({GO NEW\n});
  1975.     wait    (Wtime2,
  1976.         {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1977.         {\n>},
  1978.         {
  1979.         type({\n});
  1980.         WAITABORT(Wtime2);
  1981.         Where:={};
  1982.         case    (READNEW,
  1983.             {New},{type(newlist|{\n})},
  1984.             ,{type({1-\n})});
  1985.         loop    ({
  1986.             wait    (Wtime2*5,
  1987.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  1988.                 {続き (改行で次文書 E:終了)\n>},
  1989.                 {type({\n});im({Yes})},
  1990.                 {表示終了\n>},
  1991.                 {im({No})}
  1992.                 );
  1993.             });
  1994.         },
  1995.         {\n-現在情報はありません-\n},
  1996.         );
  1997.     LOGforum({NEW},{stop});
  1998.     };
  1999.  
  2000. /*    接続時の今週のお知らせの記録する処理    */
  2001. %NewIDX    {
  2002.     delfile(TEMP2|{newidx.tmp});
  2003.     write    (TEMP2|{newidx.tmp},{今週のお知らせ    NEW\n});
  2004.     receive(TEMP2|{newidx.tmp});
  2005.     footnote({今週のお知らせの項目をダウンロード中});
  2006.     loop    ({
  2007.         wait(Wtime2,{AbortOff({\nホストの反応が鈍いよぉ~(T◇T)\n})},
  2008.             {\n>},
  2009.             {stoprec;footnote({});im({No})},
  2010.             {\n},{im({Yes})})
  2011.         });
  2012.     };
  2013.  
  2014. /*    今週のお知らせの項目の照合処理    */
  2015. %CHKnew    {
  2016.     dispoff(!DEBUG);%ndir    TEMP2|{ndir.tmp};
  2017.     case    (COMPRESS={Yes}&&@filechk(ARCHIVER)={Yes},{Yes},
  2018.         {command(ARCHIVER|{ l }|LOG2|{NEW *.idx | sort /r > }|ndir);
  2019.         %ld @read(ndir,5);
  2020.         %lnf @case(@noline(ld)>4,{No},{im({})},{Yes},
  2021.             {%nf @head(@getchar(@getline(ld,1,1),3,12),{ });
  2022.             command(ARCHIVER|{ e }|LOG2|{NEW }|TEMP2|{ }|nf);
  2023.             im(@read(TEMP2|nf))});
  2024.         case    (lnf<>@read(TEMP2|{newidx.tmp})||lnf={},{Yes},
  2025.             {%dt @crefile(TEMP,{idx});
  2026.             command({ren }|TEMP2|{newidx.tmp }|dt);
  2027.             command(ARCHIVER|{ a }|LOG2|{NEW }|TEMP2|dt)
  2028.             });
  2029.         command({del }|TEMP2|{*.idx});
  2030.         },{No},
  2031.         {command({dir }|LOG2|{NEW\*.idx | sort /r > }|ndir);
  2032.         %ld @read(ndir);
  2033.         %lnf @case(@noline(ld)>5,{No},{im({})},{Yes},
  2034.             {im(@read(LOG2|{NEW\}|@getchar(@getline(ld,1,1),1,8)|
  2035.                 {.IDX}))});
  2036.         case    (lnf<>@read(TEMP2|{newidx.tmp})||lnf={},{Yes},
  2037.             {
  2038.             %dt @crefile(LOG2|{NEW},{idx});
  2039.             dispoff(!DEBUG);
  2040.             command({copy }|TEMP2|{newidx.tmp }|LOG2|{NEW\}|dt);
  2041.             dispoff({No});
  2042.             });
  2043.         });
  2044.     delfile(TEMP2|{newidx.tmp});delfile(ndir);
  2045.     dispoff({No});
  2046.     };
  2047.  
  2048. /************************************************************************
  2049. *    課金情報を見る処理                        *
  2050. *************************************************************************/
  2051. %GOBILL    {
  2052.     footnote({課金情報を確認しています});
  2053.     display({課金情報を確認します\n});
  2054. /*    case(CUGFLAG,{Yes},{type({GO BILL\n})},,{type({GO NEWBILL\n})}); */
  2055.     type({GO BILL\n});
  2056.     LOGforum({BILL},{start});
  2057.     wait    (Wtime2,
  2058.         {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  2059.         {1. ご案内},
  2060.         {WAITABORT(Wtime2);type({2\n})}
  2061.         );
  2062.     wait    (Wtime2*2,
  2063.         {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  2064.         {日毎情報 (改行で表示  E:終了)\n>},
  2065.         {
  2066.         case    (CHKBILL,
  2067.             {Detail},
  2068.             {
  2069.             type({SET PAGE OFF\n});
  2070.             WAITABORT(Wtime2);
  2071.             type({\n});
  2072.             wait    (Wtime2*10,
  2073.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  2074.                 {1. ご案内},{WAITABORT(Wtime2)},
  2075.                 );
  2076.             });
  2077.         LOGforum({BILL},{stop});
  2078.         },
  2079.         {表示情報選択},
  2080.         {
  2081.         WAITABORT(Wtime2);
  2082.         case    (CHKBILL,
  2083.             {Detail},
  2084.             {
  2085.             type({SET PAGE OFF\n});
  2086.             WAITABORT(Wtime2);
  2087.             type({2\n});
  2088.             wait    (Wtime2,
  2089.                 {AbortOff({\nホストの反応が鈍いよぉ~\n})},
  2090.                 {表示月選択},
  2091.                 {
  2092.                 WAITABORT(Wtime2);
  2093.                 type({\n});
  2094.                 wait    (Wtime2*10,
  2095.                     {AbortOff({\nホストの反応が}|
  2096.                         {鈍いよぉ~\n})},
  2097.                     {表示情報選択},
  2098.                     {
  2099.                     WAITABORT(Wtime2);
  2100.                     type({E\n});
  2101.                     WAITABORT(Wtime2);
  2102.                     });
  2103.                 });
  2104.             });
  2105.         LOGforum({BILL},{stop});
  2106.         },
  2107.         {1. ご案内},
  2108.         {
  2109.         WAITABORT(Wtime2);
  2110.         LOGforum({BILL},{cancel});
  2111.         });
  2112.     Where:={};
  2113.     };
  2114.  
  2115. /************************************************************************
  2116. *    オンライン処理                            *
  2117. *************************************************************************/
  2118. /*    ログインのみの処理    */
  2119. %LOGIN1    {
  2120.     FAPXLGIN;
  2121.     case    (RETCD={Start},{Yes},
  2122.         {setcdir(CDIR);FREE1:={ 2};#FAPXFREE.PLP;LogOff;im({No})},
  2123.         {No},{im({Yes})}
  2124.         );
  2125.     };
  2126.  
  2127. /*    アップロード処理    */
  2128. %UPLD    {setcdir(CDIR);#FAPXUPLD.PLP};
  2129.  
  2130. /*    ダウンロード処理    */
  2131. %DNLD    {setcdir(CDIR);#FAPXDNLD.PLP};
  2132.  
  2133. /*    オンライン処理    */
  2134. %ONLINE1{
  2135.     NewsDown:={No};
  2136.     FAPXLGIN;
  2137.     case    (RETCD,
  2138.         {Start},
  2139.         {
  2140.         delfile(TEMP2|{fapx.log});
  2141.         case    (@filechk(LOG2|{myforum.log})={No}&&MFRM<>{No},
  2142.             {Yes},
  2143.             {
  2144.             display({MYFORUM.LOG を作成します\n});
  2145.             footnote({MYFORUM.LOG を作成します});
  2146.             case(CUGFLAG,{Yes},{GONIF});
  2147.             receive(LOG2|{myforum.log});
  2148.             type({MYFORUM\n});
  2149.             wait(,,
  2150.                 {表示終了\n},{stoprec;WAITABORT(Wtime2)},
  2151.                 {ません  -\n},{stoprec;WAITABORT(Wtime2)});
  2152.             });
  2153.         case    (FREE1,{ 1},{setcdir(CDIR);#FAPXFREE.PLP});
  2154.         case    (PAD,
  2155.             {first},
  2156.             {
  2157.             PADFILE:=@dir2(PADDIR)|{PAD};
  2158.             case    (@filechk(PADFILE),
  2159.                 {Yes},{setcdir(CDIR);#FAPXPAD.PLP});
  2160.             PADFILE:={};
  2161.             setcdir(CDIR);#FAPXPAD.PLP;
  2162.             });
  2163.         case    (MAILDOWN={Yes}||MAILDOWN={TextOnly},
  2164.             {Yes},{setcdir(CDIR);#FAPXMAIL.PLP});
  2165.         case    (@filechk(UP2|{_FORUM.CTL}),
  2166.             {Yes},{setcdir(CDIR);#FAPXENTR.PLP});
  2167.         case    (WEATHER,{Yes},{GOWEATHER(AREA,CITY)});
  2168.         case    (UPT={first}&&@filechk(UP2|{fapxup.ctl})={Yes},
  2169.             {Yes},{UPLD});
  2170.         case    (DNT={first}&&(
  2171.             @filechk(UP2|{fapxdown.ctl})={Yes}||
  2172.             @filechk(UP2|{fapxrtn.ctl})={Yes}),
  2173.             {Yes},{DNLD});
  2174.         DOWNSTART;
  2175.         case    (DONIFTY={No},
  2176.             {No},
  2177.             {
  2178.             setcdir(CDIR);#FAPXLOOP.PLP;
  2179.             });
  2180.         setcdir(CDIR);#FAPXRTN.PLP;
  2181.         DOWNSTOP;
  2182.         case(CHKBILL={Yes}||CHKBILL={Detail},{Yes},{GOBILL});
  2183.         case(READNEW,{Yes},{NewsDown:={Yes}});
  2184.         case(NewsDown,{Yes},{GONEW});
  2185.         NewsDown:={No};
  2186.         case    (PAD,
  2187.             {last},
  2188.             {
  2189.             PADFILE:=@dir2(PADDIR)|{PAD};
  2190.             case    (@filechk(PADFILE),
  2191.                 {Yes},{setcdir(CDIR);#FAPXPAD.PLP});
  2192.             PADFILE:={};
  2193.             setcdir(CDIR);#FAPXPAD.PLP;
  2194.             });
  2195.         case(FREE1,{ 2},{setcdir(CDIR);#FAPXFREE.PLP});
  2196.         case    (UPT={last}&&@filechk(UP2|{fapxup.ctl})={Yes},
  2197.             {Yes},{UPLD});
  2198.         case    (DNT={last}&&(
  2199.             @filechk(UP2|{fapxdown.ctl})={Yes}||
  2200.             @filechk(UP2|{fapxrtn.ctl})={Yes}),
  2201.             {Yes},{DNLD});
  2202.         LogOff;
  2203.         SNDMSG({owata_f.snd});wait(2);
  2204.         case    (fapxend,
  2205.             { 1},{PLTSTOP},
  2206.             { 2},{stopterm},
  2207.             { 3},{setcdir(CDIR);command({poff});im({No})},
  2208.             { 4},{im({No})}
  2209.             );
  2210.         },
  2211.         ,{im({Yes})});
  2212.     };
  2213.  
  2214. %FAPXLGIN{
  2215.     var    N1    [2];
  2216.     var    N2    [2];
  2217.     var    N31    [2];
  2218.     var    N32    [2];
  2219.     var    N33    [2];
  2220.     var    road1    [20];
  2221.     var    road2    [20];
  2222.     var    road3    [20];
  2223.  
  2224.     %CHECK3AM{
  2225.         case    (AM3,
  2226.             {Yes},{WAIT3AM},
  2227.             {Detail},{WAITSETTIME},
  2228.             ,{RETCD:={Start}}
  2229.             );
  2230.         case(RETCD,{Start},{AUTOLOGIN});
  2231.         };
  2232.  
  2233.     case    (@linechck,
  2234.         {Yes},
  2235.         {
  2236.         SNDMSG({kaknin_f.snd});
  2237.         footnote({回線接続中です。NIFTYにログインし直しますか});
  2238.         select    ({回線接続中です。NIFTYにログインし直しますか},
  2239.             Wtime4,
  2240.             {CHECK3AM},
  2241.             {NIFTYにログインした後、実行する},
  2242.             {CHECK3AM},
  2243.             {ログインし直さず、そのまま実行する},
  2244.             {initmode;gotoTOP(0);MLcnt:=-1;RETCD:={Start}}
  2245.             );
  2246.         },
  2247.         {No},{CHECK3AM}
  2248.         );
  2249.     };
  2250.  
  2251. /************************************************************************
  2252. *    NIFTYへの通信メインメニュー                *
  2253. ************************************************************************/
  2254. %ONLINE    {
  2255.     var    APTYPE    [1];    APTYPE:={x};
  2256.     var    FREE1    [3];    FREE1:=    { 3};        var    donifty    [2];
  2257.     var    upt    [2];    var    dnt    [2];    var    pad    [2];
  2258.     var    mail    [2];    var    delmail    [2];    var    chksdl    [2];
  2259.     var    weather    [2];    var    readnew    [2];    var    chkbill    [2];
  2260.     var    free1    [2];    var    ap3    [2];    var    am3    [2];
  2261.     var    fapxend    [2];    var    setup    [2];    var    updnset    [2];
  2262.     var    ok    [2];
  2263.     loop    ({
  2264.         SNDMSG({erande_f.snd});
  2265.         footnote({現在のユーザー設定ファイル=}|SETFILE1|
  2266.                 {  NIFTY設定ファイル=}|SETFILE2);
  2267.         free1:=    FREE1;
  2268.         donifty:=@case    (DONIFTY,
  2269.                 {Yes},{im({ 1})},{No},{im({ 3})},
  2270.                 {},{im({ 1})},,{im({ 2})});
  2271.         upt:=    @case    (UPT,
  2272.                 {first},{im({ 1})},{last},{im({ 2})},
  2273.                 {No},{im({ 3})},,{im({ 1})});
  2274.         dnt:=    @case    (DNT,
  2275.                 {first},{im({ 1})},{last},{im({ 2})},
  2276.                 {No},{im({ 3})},,{im({ 1})});
  2277.         pad:=    @case    (PAD,
  2278.                 {forum},{im({ 1})},{first},{im({ 2})},
  2279.                 {last},{im({ 3})},{None},{im({ 4})},
  2280.                 ,{im({ 4})});
  2281.         mail:=    @case    (MAILDOWN,
  2282.                 {Yes},{im({ 1})},{TextOnly},{im({ 2})},
  2283.                 {No},{im({ 3})},,{im({ 1})});
  2284.         delmail:=@YesNo(MAILDEL,{2});
  2285.         chksdl:=@YesNo(CHKSDL,{2});
  2286.         weather:=@YesNo(WEATHER,{2});
  2287.         readnew:=@case    (READNEW,
  2288.                 {Yes},{im({ 1})},{New},{im({ 2})},
  2289.                 {Idx},{im({ 3})},{No},{im({ 4})},,{im({ 4})});
  2290.         chkbill:=@case    (CHKBILL,
  2291.                 {Yes},{im({ 1})},{Detail},{im({ 2})},
  2292.                 {Sometimes},{im({ 4})},,{im({ 3})});
  2293.         ap3:=@YesNo(AP3,{2});
  2294.         am3:=    @case    (AM3,
  2295.                 {Yes},{im({ 1})},{Detail},{im({ 2})},
  2296.                 ,{im({ 3})});
  2297.         fapxend:=@case    (FAPXEND,
  2298.                 {stopfapx},{im({ 1})},{stopmop},{im({ 2})},
  2299.                 {poweroff},{im({ 3})},{continue},{im({ 4})},
  2300.                 ,{im({ 4})});
  2301.         var    udtp[1];    udtp:=0;
  2302.         case    (@filechk(UP2|{fapxup.ctl}),{Yes},{udtp:=udtp+1});
  2303.         case    (@filechk(UP2|{fapxdown.ctl})={Yes}||
  2304.             @filechk(UP2|{fapxrtn.ctl})={Yes},
  2305.             {Yes},{udtp:=udtp+2});
  2306.         %b    {r自動通信処理(NIFTYでの処理)/する/強制巡回/しない\n};
  2307.         %c @case(udtp=1||udtp=3,{Yes},
  2308.         {im({rアップロード処理(予約あり)     /最初/最後/しない \n})},
  2309.             {No},
  2310.             {im({cアップロード処理(予約なし)\n})});
  2311.         %d @case(udtp=2||udtp=3,{Yes},
  2312.         {im({rダウンロード処理(予約あり)     /最初/最後/しない \n})},
  2313.             {No},
  2314.             {im({cダウンロード処理(予約なし)\n})});
  2315. /*        %c @case(udtp=1||udtp=3,{Yes},
  2316.         {im({rアップロード処理      /最初(巡回前)/最後(巡回後)/しない\n})},
  2317.             {No},
  2318.             {im({cアップロード処理(予約なし)\n})});
  2319.         %d @case(udtp=2||udtp=3,{Yes},
  2320.         {im({rダウンロード処理      /最初(巡回内)/全体の最後/しない\n})},
  2321.             {No},
  2322.             {im({cダウンロード処理(予約なし)\n})});    */
  2323.         %e    {rPAD処理      /巡回のみ/最初/最後/しない\n}|
  2324.             {rメールのダウンロード       /する/テキストのみ/しない\n}|
  2325.             {r    既読メールの削除       /する/しない \n}|
  2326.             {r    メール送信簿の確認     /する/しない \n}|
  2327.             {r天気予報(NAPLPS)の確認     /する/しない \n}|
  2328.             {r今週のお知らせのダウンロード/強制/オート/項目/しない\n}|
  2329.             {r課金情報の確認  /する/詳細情報/しない/するかも\n}|
  2330.             {r自由行動                  /最初/最後/しない \n}|
  2331.             {rアクセスポイント種別              /ROAD3・4 /ROAD1・2\n}|
  2332.             {r通信開始時間               /割引時間/時刻指定/即時\n}|
  2333.             {r通信終了後      /FAPX終了/MOPT終了}|
  2334.                         {/電源切断/FAPX継続\n}|
  2335.             {s設定変更処理          /NIFTY設定 / 各種設定 }|
  2336.                         {/ 詳細設定 \n}|
  2337.             {sアップ・ダウン指定設定処理 / アップロード / ダウンロード }|
  2338.                         {/フォーラム登録 \n}|
  2339.             {s通信を開始する        /  開  始  /  半自動  }|
  2340.                         {/  終  了  \n};
  2341.         %a    @case(udtp,
  2342.                 0,
  2343.                 {im(@plane(b|c|d|e,donifty,pad,mail,
  2344.                     delmail,chksdl,weather,readnew,chkbill,
  2345.                     FREE1,ap3,am3,fapxend))
  2346.                 },
  2347.                 1,
  2348.                 {im(@plane(b|c|d|e,donifty,upt,pad,mail,
  2349.                     delmail,chksdl,weather,readnew,chkbill,
  2350.                     FREE1,ap3,am3,fapxend))
  2351.                 },
  2352.                 2,
  2353.                 {im(@plane(b|c|d|e,donifty,dnt,pad,mail,
  2354.                     delmail,chksdl,weather,readnew,chkbill,
  2355.                     FREE1,ap3,am3,fapxend))
  2356.                 },
  2357.                 3,
  2358.                 {im(@plane(b|c|d|e,donifty,upt,dnt,pad,mail,
  2359.                     delmail,chksdl,weather,readnew,chkbill,
  2360.                     FREE1,ap3,am3,fapxend))
  2361.                 });
  2362.         donifty:=@head(@getline(a,1,1),{\n});
  2363.         case(udtp=1||udtp=3,{Yes},{upt:=@head(@getline(a,2,1),{\n})});
  2364.         case(udtp,
  2365.             2,{dnt:=@head(@getline(a,2,1),{\n})},
  2366.             3,{dnt:=@head(@getline(a,3,1),{\n})});
  2367.         case(udtp>1,{Yes},{udtp:=udtp-1});
  2368.         pad:=    @head(@getline(a,2+udtp,1),{\n});
  2369.         mail:=    @head(@getline(a,3+udtp,1),{\n});
  2370.         delmail:=@head(@getline(a,4+udtp,1),{\n});
  2371.         chksdl:=@head(@getline(a,5+udtp,1),{\n});
  2372.         weather:=@head(@getline(a,6+udtp,1),{\n});
  2373.         readnew:=@head(@getline(a,7+udtp,1),{\n});
  2374.         chkbill:=@head(@getline(a,8+udtp,1),{\n});
  2375.         FREE1:=    @head(@getline(a,9+udtp,1),{\n});
  2376.         ap3:=    @head(@getline(a,10+udtp,1),{\n});
  2377.         am3:=    @head(@getline(a,11+udtp,1),{\n});
  2378.         fapxend:=@head(@getline(a,12+udtp,1),{\n});
  2379.         setup:=    @head(@getline(a,13+udtp,1),{\n});
  2380.         updnset:=@head(@getline(a,14+udtp,1),{\n});
  2381.         ok:=    @head(@getline(a,15+udtp,1),{\n});
  2382.         case    (donifty,
  2383.             { 1},{DONIFTY:={Yes}},
  2384.             { 2},{DONIFTY:={Force}},
  2385.             { 3},{DONIFTY:={No}},
  2386.             ,{DONIFTY:={Yes}});
  2387.         case    (upt,
  2388.             { 1},{UPT:={first}},
  2389.             { 2},{UPT:={last}},
  2390.             { 3},{UPT:={No}},
  2391.             ,{UPT:={first}});
  2392.         case    (dnt,
  2393.             { 1},{DNT:={first}},
  2394.             { 2},{DNT:={last}},
  2395.             { 3},{DNT:={No}},
  2396.             ,{DNT:={first}});
  2397.         case    (pad,
  2398.             { 1},{PAD:={forum}},
  2399.             { 2},{PAD:={first}},
  2400.             { 3},{PAD:={last}},
  2401.             { 4},{PAD:={None}},
  2402.             ,{PAD:={None}});
  2403.         case    (mail,
  2404.             { 1},{MAILDOWN:={Yes}},
  2405.             { 2},{MAILDOWN:={TextOnly}},
  2406.             { 3},{MAILDOWN:={No}},
  2407.             ,{MAILDOWN:={Yes}});
  2408.         case    (delmail,
  2409.             { 1},{MAILDEL:={Yes}},
  2410.             { 2},{MAILDEL:={No}},
  2411.             ,{MAILDEL:={No}});
  2412.         case    (chksdl,
  2413.             { 1},{CHKSDL:={Yes}},
  2414.             { 2},{CHKSDL:={No}},
  2415.             ,{CHKSDL:={No}});
  2416.         case    (weather,
  2417.             { 1},{WEATHER:={Yes}},
  2418.             { 2},{WEATHER:={No}},
  2419.             ,{WEATHER:={No}});
  2420.         case    (readnew,
  2421.             { 1},{READNEW:={Yes}},
  2422.             { 2},{READNEW:={New}},
  2423.             { 3},{READNEW:={Idx}},
  2424.             { 4},{READNEW:={No}},
  2425.             ,{READNEW:={No}});
  2426.         case    (chkbill,
  2427.             { 1},{CHKBILL:={Yes}},
  2428.             { 2},{CHKBILL:={Detail}},
  2429.             { 3},{CHKBILL:={No}},
  2430.             { 4},{CHKBILL:={Sometimes}},
  2431.             ,{CHKBILL:={No}});
  2432.         case    (am3,
  2433.             { 1},{AM3:={Yes}},
  2434.             { 2},{AM3:={Detail}},
  2435.             { 3},{AM3:={No}},
  2436.             ,{AM3:={No}});
  2437.         case    (ap3,
  2438.             { 1},{AP3:={Yes}},
  2439.             { 2},{AP3:={No}},
  2440.             ,{AM3:={No}});
  2441.         case    (fapxend,
  2442.             { 1},{FAPXEND:={stopfapx}},
  2443.             { 2},{FAPXEND:={stopmop}},
  2444.             { 3},{FAPXEND:={poweroff}},
  2445.             { 4},{FAPXEND:={continue}},
  2446.             ,{FAPXEND:={continue}});
  2447.         case    (ok,
  2448.             { 1},
  2449.             {case    (DONIFTY={No}&&UPT={No}&&DNT={No}&&
  2450.                 MAILDOWN={No}&&WEATHER={No}&&
  2451.                 READNEW<>{Yes}&&CHKBILL={No}&&FMNEWS={No},
  2452.                 {Yes},    {LOGIN1},
  2453.                 {No},    {case    (@SETFORCE,
  2454.                         {Yes},{ONLINE1},
  2455.                         {No},{im({Yes})}
  2456.                         );
  2457.                     }
  2458.                 );
  2459.             },
  2460.             { 2},{SEMIAUTO},
  2461.             { 3},{im({No})},
  2462.             ,
  2463.             {
  2464.             case    (setup,
  2465.                 { 1},{setcdir(CDIR);#FAPXNIF.PLP},
  2466.                 { 2},{setcdir(CDIR);#FAPXSET.PLP},
  2467.                 { 3},{setcdir(CDIR);#FAPXSETC.PLP});
  2468.             case    (updnset,
  2469.                 { 1},{setcdir(CDIR);#FAPXUSET.PLP},
  2470.                 { 2},{setcdir(CDIR);#FAPXDSET.PLP},
  2471.                 { 3},{setcdir(CDIR);#FAPXTSET.PLP});
  2472.             case    (ok={ 0}&&setup={ 0}&&updnset={ 0},
  2473.                 {Yes},{im({No})},
  2474.                 {No},{im({Yes})});
  2475.             });
  2476.         });
  2477.     };
  2478.  
  2479. /************************************************************************
  2480. *    半自動通信処理                            *
  2481. ************************************************************************/
  2482. %SEMIAUTO{
  2483.     var Nifty[1000];
  2484.     var NOLINE[2];
  2485.     var NOLINE2[2];
  2486.     var check[3];
  2487.     var a[26];
  2488.     var b[12];
  2489.     var c[8];
  2490.     var n[2];
  2491.     var d[2];
  2492.     var onenif[256];
  2493.     case    (NIFTY={},
  2494.         {No},
  2495.         {
  2496.         n:=1;
  2497.         d:=1;
  2498.         loop    ({
  2499.             onenif:=@getline(NIFTY,n,1);
  2500.             case    (onenif={\n},
  2501.                 {Yes},,
  2502.                 {No},
  2503.                 {
  2504.                 case    (@nth(onenif,1,{/}),
  2505.                     {ホームパーティ},{b:=  {HP   }},
  2506.                     {パティオ},{b:=  {PATIO  }},
  2507.                     {フォーラム},{b:={フォーラム  }},
  2508.                     {CUG会議室},{b:= {CUGMES }},
  2509.                     {再ログイン},{b:={再ログイン}},
  2510.                     ,{b:=@nth(onenif,1,{/})}
  2511.                     );
  2512.                 %jumpcode @nth(onenif,3,{/});
  2513.                 c:=@SPP(jumpcode,8,1);
  2514.                 a:=b|{:}|c;
  2515.                 case    (d,
  2516.                     1,{Nifty:=Nifty|{s   /}|a;
  2517.                         d:=2;NOLINE:=NOLINE+1},
  2518.                     2,{Nifty:=Nifty|{/}|a;d:=3},
  2519.                     3,{Nifty:=Nifty|{/}|a|{\n};d:=1}
  2520.                     );
  2521.                 case    (@getline(NIFTY,n+1,1),
  2522.                     {},
  2523.                     {
  2524.                     case(d<>1,{Yes},{Nifty:=Nifty|{\n}});
  2525.                     im({No});
  2526.                     },
  2527.                     ,{n:=n+1;im({Yes})}
  2528.                     );
  2529.                 });
  2530.             });
  2531.         loop    ({
  2532.             SNDMSG({erande_f.snd});
  2533.             footnote({処理を選んでください});
  2534.             select    ({処理を選んでください},
  2535.                 Wtime4,
  2536.                 {
  2537.                 chat({Yes});
  2538.                 loop    ({
  2539.                     footnote({再開},{b});
  2540.                     waitx();
  2541.                     case    (@xtype,
  2542.                         101,    {im({No})},
  2543.                         201,    {im({No})}
  2544.                         );
  2545.                     });
  2546.                 footnote({});
  2547.                 chat({No});
  2548.                 im({Yes});
  2549.                 },
  2550.                 {    ログイン    },
  2551.                 {FAPXLGIN;im({Yes})},
  2552.                 {   ログアウト   },
  2553.                 {LogOff;im({Yes})},
  2554.                 {   メール受信   },
  2555.                 {
  2556.                 case(MLcnt<1,{Yes},{MLcnt:=-1});
  2557.                 setcdir(CDIR);#FAPXMAIL.PLP;
  2558.                 im({Yes});
  2559.                 },
  2560.                 {     巡  回     },
  2561.                 {
  2562.                 DONIFTY:={Yes};
  2563.                 DOWNSTART;
  2564.                 setcdir(CDIR);#FAPXLOOP.PLP;
  2565.                 DOWNSTOP;
  2566.                 im({Yes});
  2567.                 },
  2568.                 {    指定巡回    },
  2569.                 {SELSEMI},
  2570.                 {    強制巡回    },
  2571.                 {setforce},
  2572.                 {     アップロード   },
  2573.                 {UPLD;im({Yes})},
  2574.                 {    ダウン ロード   },
  2575.                 {DNLD;im({Yes})},
  2576.                 {    天気予報    },
  2577.                 {GOWEATHER(AREA,CITY);im({Yes})},
  2578.                 { 今週のお知らせ },
  2579.                 {GONEW;im({Yes})},
  2580.                 {    課金情報    },
  2581.                 {GOBILL;im({Yes})},
  2582.                 {    自由行動    },
  2583.                 {setcdir(CDIR);#FAPXFREE.PLP;im({Yes})},
  2584.                 {   PAD処理   },
  2585.                 {execPAD;im({Yes})},
  2586.                 {    手 動    },
  2587.                 {
  2588.                 chat({Yes});
  2589.                 loop    ({
  2590.                     footnote({再開},{b});
  2591.                     waitx();
  2592.                     case    (@xtype,
  2593.                         101,    {im({No})},
  2594.                         201,    {im({No})}
  2595.                         );
  2596.                     });
  2597.                 footnote({});
  2598.                 chat({No});
  2599.                 im({Yes});
  2600.                 },
  2601.                 {     終  了     },
  2602.                 {im({No})}
  2603.                 );
  2604.             });
  2605.         });
  2606.     };
  2607.  
  2608. /*    半自動通信指定巡回処理    */
  2609. %SELSEMI{
  2610.     DOWNSTART;
  2611.     loop    ({
  2612.         SNDMSG({erande_f.snd});
  2613.         footnote({巡回する場所を指定してください});
  2614.         %a @plane({c巡回する場所を指定してください\n}|
  2615.             Nifty|
  2616.             {s   /     戻  る     });
  2617.         NOLINE2:=1;
  2618.         check:={No};
  2619.         %ok    @head(@getline(a,NOLINE+1,1),{\n});
  2620.         case    (Nifty={},
  2621.             {No},
  2622.             {
  2623.             loop    ({
  2624.                 case    (@head(@getline
  2625.                     (a,NOLINE2,1),{\n}),
  2626.                     { 1},
  2627.                     {
  2628.                     DONIFTY:=NOLINE2*3-2;
  2629.                     setcdir(CDIR);
  2630.                     #FAPXLOOP.PLP;
  2631.                     check:={Yes};
  2632.                     im({No});
  2633.                     },
  2634.                     { 2},
  2635.                     {
  2636.                     DONIFTY:=NOLINE2*3-1;
  2637.                     setcdir(CDIR);
  2638.                     #FAPXLOOP.PLP;
  2639.                     check:={Yes};
  2640.                     im({No});
  2641.                     },
  2642.                     { 3},
  2643.                     {
  2644.                     DONIFTY:=NOLINE2*3;
  2645.                     setcdir(CDIR);
  2646.                     #FAPXLOOP.PLP;
  2647.                     check:={Yes};
  2648.                     im({No});
  2649.                     },
  2650.                     ,
  2651.                     {
  2652.                     case    (NOLINE2,
  2653.                         NOLINE,
  2654.                         {im({No})},
  2655.                         ,
  2656.                         {
  2657.                         NOLINE2:=NOLINE2+1;
  2658.                         im({Yes});
  2659.                         });
  2660.                     });
  2661.                 });
  2662.             });
  2663.         im(!(ok={ 1}||check={No}));
  2664.         });
  2665.     DOWNSTOP;
  2666.     im({Yes});
  2667.     };
  2668.  
  2669. /*    PADファイル内容確認    */
  2670. %KAKUNIN{
  2671.     var    file1    [64];
  2672.     var    memono    [1];
  2673.     case    (@mlast==9,{Yes},{memono:=9},{No},{memono:=@mlast+1});
  2674.     setcdir(PADDIR);
  2675.     loop    ({
  2676.         footnote({PADファイルを選択してください});
  2677.         file1:=@filesel;
  2678.         case(file1<>{},{Yes},{file1:=@dir2(@getcdir)|file1});
  2679.         case    (file1={}||@filechk(file1)={No},
  2680.             {Yes},{file1:={}},
  2681.             {No},
  2682.             {
  2683.             footnote({PADファイルを確認します});
  2684.             InactMemo;
  2685.             madd(memono,{});
  2686.             mclear(memono);
  2687.             mread(file1,memono);
  2688.             mopen(memono,0,21,639,459,{w});
  2689.             %a    @loop    ({
  2690.                     footnote({指定 次 取消},{b});
  2691.                     waitx();
  2692.                     case    (@xtype,
  2693.                         101,{im(file1)},
  2694.                         201,{im(file1)},
  2695.                         102,{im({next})},
  2696.                         202,{im({next})},
  2697.                         103,{im({cancel})},
  2698.                         203,{im({cancel})},
  2699.                         ,{im({Yes})}
  2700.                         );
  2701.                     });
  2702.             InactMemo;
  2703.             case    (a,
  2704.                 {next},{im({Yes})},
  2705.                 {cancel},{file1:={};im({No})},
  2706.                 ,{im({No})}
  2707.                 );
  2708.             });
  2709.         });
  2710.     loop    ({
  2711.         case(@mlast>=memono,{Yes},{mopen(@mlast);mclose(3)});
  2712.         im(@mlast>=memono);
  2713.         });
  2714.     im(file1);
  2715.     };
  2716.  
  2717. /*    PAD処理    */
  2718. %execPAD{
  2719.     PADFILE:=@KAKUNIN;
  2720.     setcdir(CDIR);#FAPXPAD.PLP;
  2721.     Where:={};
  2722.     };
  2723.  
  2724. /************************************************************************
  2725. *    強制巡回設定処理                        *
  2726. ************************************************************************/
  2727. %setforce{
  2728.     SNDMSG({erande_f.snd});
  2729.     select({強制巡回のタイプを選んでください},
  2730.         Wtime4,{im({Yes})},
  2731.         {  設定場所全巡回  },    {DONIFTY:={All};
  2732.                     DOWNSTART;
  2733.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2734.                     DOWNSTOP;
  2735.                     im({Yes})},
  2736.         { フォーラム全巡回 },    {DONIFTY:={Forum};
  2737.                     DOWNSTART;
  2738.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2739.                     DOWNSTOP;
  2740.                     im({Yes})},
  2741.         {    HP全巡回    },    {DONIFTY:={Hp};
  2742.                     DOWNSTART;
  2743.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2744.                     DOWNSTOP;
  2745.                     im({Yes})},
  2746.         {  パティオ全巡回  },    {DONIFTY:={Patio};
  2747.                     DOWNSTART;
  2748.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2749.                     DOWNSTOP;
  2750.                     im({Yes})},
  2751.         {     日付無視     },    {DONIFTY:={Day};
  2752.                     DOWNSTART;
  2753.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2754.                     DOWNSTOP;
  2755.                     im({Yes})},
  2756.         {     時間無視     },    {DONIFTY:={Time};
  2757.                     DOWNSTART;
  2758.                     setcdir(CDIR);#FAPXLOOP.PLP;
  2759.                     DOWNSTOP;
  2760.                     im({Yes})},
  2761.         {    キャンセル    },    {im({Yes})});
  2762.     };
  2763.  
  2764. /*    強制巡回指定処理    */
  2765. %SETFORCE{
  2766.     case    (DONIFTY,
  2767.         {Force},
  2768.         {
  2769.         SNDMSG({erande_f.snd});
  2770.         select({強制巡回のタイプを選んで下さい},
  2771.             Wtime4,{im({No})},
  2772.             {  設定場所全巡回  },{DONIFTY:={All};im({Yes})},
  2773.             { フォーラム全巡回 },{DONIFTY:={Forum};im({Yes})},
  2774.             {    HP全巡回    },{DONIFTY:={Hp};im({Yes})},
  2775.             {  パティオ全巡回  },{DONIFTY:={Patio};im({Yes})},
  2776.             {     日付無視     },{DONIFTY:={Day};im({Yes})},
  2777.             {     時間無視     },{DONIFTY:={Time};im({Yes})},
  2778.             {    キャンセル    },{im({No})});
  2779.         },
  2780.         ,{im({Yes})}
  2781.         );
  2782.     };
  2783.  
  2784. /************************************************************************
  2785. *    通信処理メイン                            *
  2786. ************************************************************************/
  2787. var    RECFILE    [64];    /* receivefile 名(フルパス)    */
  2788. var    FTITLE    [64];    /* フォーラムタイトル            */
  2789. var    TELNO    [20];    /* 電話番号            */
  2790. var    RETCD    [6];    /* FAPXLGINのリターンコード        */
  2791. var    RecForm    [16];    /* 異常終了の際のレコードフラグ    */
  2792. var    NewsDown[3];    /* 今週のお知らせダウンフラグ    */
  2793. var    Where    [80];    /* NIFTY内の現在位置        */
  2794. var    Stime    [7];    /* CONNECT後のLOGIN終了時間(秒)    */
  2795. var    UID    [8];    /* ログイン中のUSER-ID        */
  2796. var    mltitle[128];    /* RTN,LIBリスト取得用トラップ    */
  2797. var    DLMFLAG    [3];    /* DLM ON/OFF状態フラグ        */
  2798. var    PADFILE    [64];    /* PAD制御ファイル名        */
  2799. var    CUGFLAG    [3];    /* CUG移動状態フラグ        */
  2800. var    RtcOpen    [1];    /* RTCチャンネルオープンフラグ        */
  2801. var    MLcnt    [2];    /* 未読メール数            */
  2802.  
  2803. DLMFLAG:={No};
  2804. ONLINE;
  2805.